473,378 Members | 1,504 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,378 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 1892
> 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

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...
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...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

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.