python-mysqldb__debian_to_freebsd

Mike Meyer mwm at mired.org
Wed Nov 16 23:44:30 EST 2005


Damjan <gdamjan at 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
questions at 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 <mwm at mired.org>			http://www.mired.org/home/mwm/
Independent WWW/Perforce/FreeBSD/Unix consultant, email for more information.



More information about the Python-list mailing list