473,699 Members | 2,278 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

python-mysqldb__debian _to_freebsd


Greetings ....

I'm using a commercial web host running FreeBSD
that fortunately has Python and MySQL,
but no python-mysqldb module ....

Before begging the host to install it
I thought I would try the Debian version
that I have on the outside chance
that it might fly directly under FreeBSD
on the server ....

import MySQLdb .... leads to the ImportError message ....

Shared object "libpthread.so. 0" not found,
required by "_mysql.so"

On my local Debian installation the reference
to that particular library file is actually
a symbolic link ....

libpthread.so.0 -> libpthread-0.10.so

I copied libpthread-0.10.so over to the server
in a directory that is in the Python search path
and renamed it to libpthread.so.0 ....

I tried to make the symbolic link as above
from Python since I don't have a shell account,
but it failed for some reason that I don't recall
at the moment ....

After a bit of google-izing and a quick scan
of the MySQL install docs, I also set
the LD_LIBRARY_PATH enviroment variable
to point to the dir where the supposed missing
file lives ....

Is there any at all chance that this will work
with the proper configs or should I go ahead
and beg the host for an installation ?

Any clues would be greatly appreciated ....
--
Stanley C. Kitching
Human Being
Phoenix, Arizona
----== Posted via Newsfeeds.Com - Unlimited-Unrestricted-Secure Usenet News==----
http://www.newsfeeds.com The #1 Newsgroup Service in the World! 120,000+ Newsgroups
----= East and West-Coast Server Farms - Total Privacy via Encryption =----
Nov 22 '05 #1
6 1911
> Is there any at all chance that this will work
with the proper configs or should I go ahead
and beg the host for an installation ?


It seems to me very unlikely that a program compiled for FreeBSD would link
to a library compiled for Debian Linux which in turn was linked to a Debian
libmysql but now has to work with the FreeBSD libmysql... I just don't
beleive you can make this work.

--
damjan
Nov 22 '05 #2
> Is there any at all chance that this will work
with the proper configs or should I go ahead
and beg the host for an installation ?


It seems to me very unlikely that a program compiled for FreeBSD would link
to a library compiled for Debian Linux which in turn was linked to a Debian
libmysql but now has to work with the FreeBSD libmysql... I just don't
beleive you can make this work.

--
damjan
Nov 22 '05 #3
Damjan <gd*****@gmail. com> writes:
Is there any at all chance that this will work
with the proper configs or should I go ahead
and beg the host for an installation ?

It seems to me very unlikely that a program compiled for FreeBSD would link
to a library compiled for Debian Linux which in turn was linked to a Debian
libmysql but now has to work with the FreeBSD libmysql... I just don't
beleive you can make this work.


Arrgh. Damjan, you *really* should have left enough context for those
reading what you have to say to figure out what that "this" was. I
have as yet to see the original on my news server, so I chased it down
on Google groups.

For the interested, the OP (Stanley Kitching), wants to use a
python-mysqldb module on his web host running FreeBSD. They don't have
the that installed, so he tried getting the Debian binary distrubtion
of the library to work, and failed. He's wondering if this is at all
possible.

Answer: yes, it might (key word - might) be made to work. Linux shared
libraries have been made to work with native applications on FreeBSD
before. I don't have the details, but would expect you'd have to
install large chunks of a Debian system to make this work. If you
really want to do this, let me know and I'll chase the details down
for you.

However, that's the wrong way to do this. First step - ask your
hosting service to install databases/py-MySQLdb. That's the Python
MySQLdb port in the FreeBSD ports tree. Installing it should be
trivial. If they won't, I'd seriously consider changing services. I
can recommend a FreeBSD-based hosting service that will install pretty
much anything in the ports tree.

The next thing to try is getting the MySQLdb pkg for FreeBSD. A pkg is
the format that FreeBSD uses for binary distributions. Look in
ftp://ftp.freebsd.org/pub/FreeBSD/ports/<ARCH>/packages-<REL>/databases.
Supported architectures are alpha, amd64, i386, ia64 and
sparc64. Supported releases (for i386, anyway) include the last
release version of FreeBSD 4, 5 and 6, the stable branch of 4 and 6,
the development and stable branches of 5, and 7-current. Most of those
should be for Python 2.4. The one I checked had MySQLdb 1.2.0 and
1.2.1c3 (a development branch).

If that fails (because they don't have a binary for the right
combination of OS and Python), get the version of the os (use the
command "uname -pr") and the version of Python, and ask here and on
qu*******@freeb sd.org to see if someone with an appropriate
installation will build you a binary. I'll do it if I have the
appropriate version of FreeBSD installed. Or install FreeBSD on a
spare system and build it yourself - once you get FreeBSD installed,
the rest is trivial, and I'll be glad to provide pointers for that.

If all that fails, *then* it's time to look into getting the debian
version of the library to work.

<mike
--
Mike Meyer <mw*@mired.or g> http://www.mired.org/home/mwm/
Independent WWW/Perforce/FreeBSD/Unix consultant, email for more information.
Nov 22 '05 #4
Damjan <gd*****@gmail. com> writes:
Is there any at all chance that this will work
with the proper configs or should I go ahead
and beg the host for an installation ?

It seems to me very unlikely that a program compiled for FreeBSD would link
to a library compiled for Debian Linux which in turn was linked to a Debian
libmysql but now has to work with the FreeBSD libmysql... I just don't
beleive you can make this work.


Arrgh. Damjan, you *really* should have left enough context for those
reading what you have to say to figure out what that "this" was. I
have as yet to see the original on my news server, so I chased it down
on Google groups.

For the interested, the OP (Stanley Kitching), wants to use a
python-mysqldb module on his web host running FreeBSD. They don't have
the that installed, so he tried getting the Debian binary distrubtion
of the library to work, and failed. He's wondering if this is at all
possible.

Answer: yes, it might (key word - might) be made to work. Linux shared
libraries have been made to work with native applications on FreeBSD
before. I don't have the details, but would expect you'd have to
install large chunks of a Debian system to make this work. If you
really want to do this, let me know and I'll chase the details down
for you.

However, that's the wrong way to do this. First step - ask your
hosting service to install databases/py-MySQLdb. That's the Python
MySQLdb port in the FreeBSD ports tree. Installing it should be
trivial. If they won't, I'd seriously consider changing services. I
can recommend a FreeBSD-based hosting service that will install pretty
much anything in the ports tree.

The next thing to try is getting the MySQLdb pkg for FreeBSD. A pkg is
the format that FreeBSD uses for binary distributions. Look in
ftp://ftp.freebsd.org/pub/FreeBSD/ports/<ARCH>/packages-<REL>/databases.
Supported architectures are alpha, amd64, i386, ia64 and
sparc64. Supported releases (for i386, anyway) include the last
release version of FreeBSD 4, 5 and 6, the stable branch of 4 and 6,
the development and stable branches of 5, and 7-current. Most of those
should be for Python 2.4. The one I checked had MySQLdb 1.2.0 and
1.2.1c3 (a development branch).

If that fails (because they don't have a binary for the right
combination of OS and Python), get the version of the os (use the
command "uname -pr") and the version of Python, and ask here and on
qu*******@freeb sd.org to see if someone with an appropriate
installation will build you a binary. I'll do it if I have the
appropriate version of FreeBSD installed. Or install FreeBSD on a
spare system and build it yourself - once you get FreeBSD installed,
the rest is trivial, and I'll be glad to provide pointers for that.

If all that fails, *then* it's time to look into getting the debian
version of the library to work.

<mike
--
Mike Meyer <mw*@mired.or g> http://www.mired.org/home/mwm/
Independent WWW/Perforce/FreeBSD/Unix consultant, email for more information.
Nov 22 '05 #5
....
For the interested, the OP (Stanley Kitching), wants to use a
python-mysqldb module on his web host running FreeBSD. They don't have
the that installed, so he tried getting the Debian binary distrubtion
of the library to work, and failed. He's wondering if this is at all
possible.

Answer: yes, it might (key word - might) be made to work. Linux shared
libraries have been made to work with native applications on FreeBSD
before. I don't have the details, but would expect you'd have to
install large chunks of a Debian system to make this work. If you
really want to do this, let me know and I'll chase the details down
for you.

However, that's the wrong way to do this. First step - ask your
hosting service to install databases/py-MySQLdb. That's the Python
MySQLdb port in the FreeBSD ports tree.
....
Mike ....

Although I've never done it personally, I have seen a few
newsgroup references that some Debian/FreeBSD packages
are interchangeable so thought the minimal effort required
for uploading the Debian MySQLdb package I have might be worth
the long shot ....
However, that's the wrong way to do this. First step - ask your
hosting service to install databases/py-MySQLdb.

That's the Python MySQLdb port in the FreeBSD ports tree.
Installing it should be trivial.
....


I did a bit more google-izing last night and found
that a FreeBSD/MySQLdb install should indeed be
a trivial matter to install via FreePorts ....

I'll go ahead and petition the host for an install ....

Thanks very much for taking the time to provide
a detailed explanation and your kind offer
for further assistance ....

Both are greatly appreciated ....
--
Stanley C. Kitching
Human Being
Phoenix, Arizona
----== Posted via Newsfeeds.Com - Unlimited-Unrestricted-Secure Usenet News==----
http://www.newsfeeds.com The #1 Newsgroup Service in the World! 120,000+ Newsgroups
----= East and West-Coast Server Farms - Total Privacy via Encryption =----
Nov 22 '05 #6
....
For the interested, the OP (Stanley Kitching), wants to use a
python-mysqldb module on his web host running FreeBSD. They don't have
the that installed, so he tried getting the Debian binary distrubtion
of the library to work, and failed. He's wondering if this is at all
possible.

Answer: yes, it might (key word - might) be made to work. Linux shared
libraries have been made to work with native applications on FreeBSD
before. I don't have the details, but would expect you'd have to
install large chunks of a Debian system to make this work. If you
really want to do this, let me know and I'll chase the details down
for you.

However, that's the wrong way to do this. First step - ask your
hosting service to install databases/py-MySQLdb. That's the Python
MySQLdb port in the FreeBSD ports tree.
....
Mike ....

Although I've never done it personally, I have seen a few
newsgroup references that some Debian/FreeBSD packages
are interchangeable so thought the minimal effort required
for uploading the Debian MySQLdb package I have might be worth
the long shot ....
However, that's the wrong way to do this. First step - ask your
hosting service to install databases/py-MySQLdb.

That's the Python MySQLdb port in the FreeBSD ports tree.
Installing it should be trivial.
....


I did a bit more google-izing last night and found
that a FreeBSD/MySQLdb install should indeed be
a trivial matter to install via FreePorts ....

I'll go ahead and petition the host for an install ....

Thanks very much for taking the time to provide
a detailed explanation and your kind offer
for further assistance ....

Both are greatly appreciated ....
--
Stanley C. Kitching
Human Being
Phoenix, Arizona
----== Posted via Newsfeeds.Com - Unlimited-Unrestricted-Secure Usenet News==----
http://www.newsfeeds.com The #1 Newsgroup Service in the World! 120,000+ Newsgroups
----= East and West-Coast Server Farms - Total Privacy via Encryption =----
Nov 22 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
8691
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9180
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8887
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6536
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5877
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4378
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
3060
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2351
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2012
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.