I'm not big into building stuff from source, I'm just wondering if libz is a distribution-dependent thing or not. (I'm running Linux Mandrake 8.0, with gcc 2.96 and mysql 11.13)
Anyway, I decided to use a RPM of a stable version of the module, and I'm not sure if it's working or not. Does anyone have a fairly small example (just connect, a single query and disconnect) to test it out?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
You probably need the libz-devel package to compile; at least, that's the Red Hat package you need. Only MySQL-3.23 needs libz; earlier versions do not. I can't figure out what version you really have (11.13 is kooky). If you have 3.22, you can remove the "-lz" from setup.py and try again.
There are brand-new RPMs of 0.9.0 release candidate 1. You could try those, too.
The docs in the RPM have some examples.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Anonymous
-
2001-05-23
You probably need the libz-devel package to compile; at least, that's the Red Hat package you need. Only MySQL-3.23 needs libz;
===
Strange. I have MySQL-3.23 and I don't appear to have libz. I didn't compile MySQL from source, but it sounds like they're supplying us with mysql but not the capability to compile it from the source.
===
earlier versions do not. I can't figure out what version you really have (11.13 is kooky).
===
Whoops.
3.23.36
If you have 3.22, you can remove the "-lz" from setup.py and try again.
There are brand-new RPMs of 0.9.0 release candidate 1. You could try those, too.
The docs in the RPM have some examples.
Cool.
One of the problems I had with the previous RPM was that it installed the files in /usr/lib/python1.5/site-packages, whereas I only have python 2.0 and couldn't find the files in the python1.5. Do you have any ideas about what to do other than copying the files manually (which sounds risky)?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
libz doesn't come with MySQL. It should be a standard Mandrake package, though libz-devel is probably an optional package.
There are two sets of RPMS: One for Python 1.5.2, and one for Python 2.1. Yes, I skipped 2.0.
Getting libz-devel is your best bet. Install that and you should be able to run:
python setup.py build # and then install
with no problems.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Anonymous
-
2001-05-23
I only installed Mandrake this weekend and it's already out of date (having python 2.0). :P
I've got a package installed called zlib1. That'd be the package you're referring to as libz, right?
Considering that libz stuff is responsible for compression and decompression, and I seem to be missing development libraries, it could explain why I got the following errors when trying to use MySQL in c:
[agrimm@mandrake mysql]$ make
gcc -c -I/usr/include/mysql client1.c
gcc -o client1 client1.o -L/usr/lib/mysql -lmysqlclient
/usr/lib/mysql/libmysqlclient.a(my_compress.o): In function `my_uncompress':
my_compress.o(.text+0xaa): undefined reference to `uncompress'
/usr/lib/mysql/libmysqlclient.a(my_compress.o): In function `my_compress_alloc':
my_compress.o(.text+0x13b): undefined reference to `compress'
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Anonymous
-
2001-05-23
Installing zlib-devel and using the -lz option managed to get my C program to compile. Thanks!
I'm downloading python2.1 and will download the release candidate next.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Anonymous
-
2001-06-04
Once I've installed python2.1 and this library via RPMs, I shouldn't need to do anything else in the way of setting up, as setup.py is for those who aren't using RPMs, right?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Well, that depends. I don't have Python 2.1 installed by RPMs, so my Python 2.1 build of MySQLdb may not install where your your Python 2.1 RPMs install. You may need to install the MySQL-python package with --relocate /usr/local/lib=/usr/lib --badreloc options to RPM, or simply rebuild the SRPM in your environment.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Anonymous
-
2001-06-04
Nailed it in one, I suspect.
The problem seems to be that the thing installed in /usr/local/lib rather than /usr/lib. Mandrake 8.0 doesn't seem to have /usr/local/lib in LD_LIBRARY_PATH, possibly because it doesn't use /usr/local/lib at all itself.
Now all I have to do familiarize myself with non-GUI RPMs...
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Anonymous
-
2001-06-04
Yep, that fixed it. Thanks!
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Anonymous
-
2001-06-25
My family recently re-installed Linux, so I had to re-install the appropriate modules.
The module is installing into /usr/lib rather than /usr/local/lib, but was installing into a directory for python1.5 (which is being used for development), and I've got a slightly more advanced version than that. So I did rpm -i --relocate /usr/lib/python1.5=/usr/lib/python2.1 --badrealloc MySQL-python(rest of long name of RPM) and it seemed to work. When using it, it complains about C API being different, but apart from that it seems to work.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I tried installing from the source, but the linker (I think) involved -lz and I don't seem to have libz.
gcc -shared build/temp.linux-i686-2.0/_mysql.o -L/usr/lib/mysql -lmysqlclient -lz -o build/lib.linux-i686-2.0/_mysql.so
/usr/bin/ld: cannot find -lz
I'm not big into building stuff from source, I'm just wondering if libz is a distribution-dependent thing or not. (I'm running Linux Mandrake 8.0, with gcc 2.96 and mysql 11.13)
Anyway, I decided to use a RPM of a stable version of the module, and I'm not sure if it's working or not. Does anyone have a fairly small example (just connect, a single query and disconnect) to test it out?
You probably need the libz-devel package to compile; at least, that's the Red Hat package you need. Only MySQL-3.23 needs libz; earlier versions do not. I can't figure out what version you really have (11.13 is kooky). If you have 3.22, you can remove the "-lz" from setup.py and try again.
There are brand-new RPMs of 0.9.0 release candidate 1. You could try those, too.
The docs in the RPM have some examples.
You probably need the libz-devel package to compile; at least, that's the Red Hat package you need. Only MySQL-3.23 needs libz;
===
Strange. I have MySQL-3.23 and I don't appear to have libz. I didn't compile MySQL from source, but it sounds like they're supplying us with mysql but not the capability to compile it from the source.
===
earlier versions do not. I can't figure out what version you really have (11.13 is kooky).
===
Whoops.
3.23.36
If you have 3.22, you can remove the "-lz" from setup.py and try again.
There are brand-new RPMs of 0.9.0 release candidate 1. You could try those, too.
The docs in the RPM have some examples.
Cool.
One of the problems I had with the previous RPM was that it installed the files in /usr/lib/python1.5/site-packages, whereas I only have python 2.0 and couldn't find the files in the python1.5. Do you have any ideas about what to do other than copying the files manually (which sounds risky)?
libz doesn't come with MySQL. It should be a standard Mandrake package, though libz-devel is probably an optional package.
There are two sets of RPMS: One for Python 1.5.2, and one for Python 2.1. Yes, I skipped 2.0.
Getting libz-devel is your best bet. Install that and you should be able to run:
python setup.py build # and then install
with no problems.
I only installed Mandrake this weekend and it's already out of date (having python 2.0). :P
I've got a package installed called zlib1. That'd be the package you're referring to as libz, right?
Considering that libz stuff is responsible for compression and decompression, and I seem to be missing development libraries, it could explain why I got the following errors when trying to use MySQL in c:
[agrimm@mandrake mysql]$ make
gcc -c -I/usr/include/mysql client1.c
gcc -o client1 client1.o -L/usr/lib/mysql -lmysqlclient
/usr/lib/mysql/libmysqlclient.a(my_compress.o): In function `my_uncompress':
my_compress.o(.text+0xaa): undefined reference to `uncompress'
/usr/lib/mysql/libmysqlclient.a(my_compress.o): In function `my_compress_alloc':
my_compress.o(.text+0x13b): undefined reference to `compress'
Don't feel too bad, Red Hat 7.1 only comes with Python 1.5.2.
zlib1 is probably the right package, so you probably need to find zlib1-devel and install that.
ftp://rpmfind.net/linux/Mandrake/8.0/i586/Mandrake/RPMS/zlib1-devel-1.1.3-15mdk.i586.rpm
Installing zlib-devel and using the -lz option managed to get my C program to compile. Thanks!
I'm downloading python2.1 and will download the release candidate next.
Once I've installed python2.1 and this library via RPMs, I shouldn't need to do anything else in the way of setting up, as setup.py is for those who aren't using RPMs, right?
Well, that depends. I don't have Python 2.1 installed by RPMs, so my Python 2.1 build of MySQLdb may not install where your your Python 2.1 RPMs install. You may need to install the MySQL-python package with --relocate /usr/local/lib=/usr/lib --badreloc options to RPM, or simply rebuild the SRPM in your environment.
Nailed it in one, I suspect.
The problem seems to be that the thing installed in /usr/local/lib rather than /usr/lib. Mandrake 8.0 doesn't seem to have /usr/local/lib in LD_LIBRARY_PATH, possibly because it doesn't use /usr/local/lib at all itself.
Now all I have to do familiarize myself with non-GUI RPMs...
Yep, that fixed it. Thanks!
My family recently re-installed Linux, so I had to re-install the appropriate modules.
The module is installing into /usr/lib rather than /usr/local/lib, but was installing into a directory for python1.5 (which is being used for development), and I've got a slightly more advanced version than that. So I did rpm -i --relocate /usr/lib/python1.5=/usr/lib/python2.1 --badrealloc MySQL-python(rest of long name of RPM) and it seemed to work. When using it, it complains about C API being different, but apart from that it seems to work.