473,326 Members | 2,175 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

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 1891
> 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*******@freebsd.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.org> 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*******@freebsd.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.org> 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
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.