From: olipt at mayo.edu (Travis Oliphant)
Date: Mon, 5 Apr 1999 22:18:36 -0500
Subject: building python from the tarball on RedHat
In-Reply-To: <3709464A.7C5F02D1@ablecommerce.com>
References: <3709464A.7C5F02D1@ablecommerce.com>
Message-ID: <Pine.SGI.4.05.9904052203420.28568-100000@explorer.mayo.edu>
Content-Length: 2443
X-UID: 1357                                                  

> Howdy All!
> 
> Hopefully that subject will narrow down those looking at this message
> and save everyone some time.
> 
> First, a confession.  I've got a wierd (i think) linux setup.  I'm
> running the RedHat 5.2 distribution, but I'm using several applications
> from source; I'm bypassing the RPM mechanism.  This may be the cause of
> my troubles, but....   I want to be able to build from tar balls, so...

This shouldn't be a problem --- rpm's are just easier.  One thing you
might try is downloading a source RPM and building the binary yourself --
it will do the equivalent of a make, but then you'll have a binary package
that you can manage and will fit in your system.  I've done this several
times and could answer questions about this approach.

> 
> I need to have my system setup to run apache (1.3.6), php3 (3.05) and
> MySQL (3.22.20a).  Using the default RPM's for each of these didn't get
> me a working system in which php would talk to mysql.  To make that much
> work, I downloaded the tar balls for each app, ungzip'd and did the
> usual ./configure; make; make install; process.
> 

Are the "default" RPMS the ones that come from RedHat?  I get very
up-to-date RPMS (or I rebuild new ones using the src.rpm which is also
easy) from http://www.andrich.net/python).  He has a slew of other
extensions, too.  

> 
> './python: error in loading shared libraries
> libmysqlclient.so.6: cannot open shared object file:  No such file or
> directory
> make: *** [libinstall] Error 127'

Is the makefile running python?  It looks like the dynamic linker is not
finding libmysqlclient.so.6, right?  It will only find it if it's internal
cache has been updated with ldconfig.  This is necessary if shared
libraries are installed outside of "standard directories"

> 
> The file 'libmysqlclient.so.6' is in /usr/local/lib/mysql  and that
> directory is named in the Modules/Setup file.  Not sure about pasting
> that section in here, but let me know if that info would help as well.
> I just pulled the block from the readme.

If as you say the libmysqlclient.so.6 file is in /usr/local/lib/mysql
then I would try running
/sbin/ldconfig /usr/local/lib/mysql

and then see if the dynamic linker can load the shared library when python
is run.  When you install RPMS that included shared libraries this program
is often run for you after installation.

Good luck.  I'm a python user on RedHat 5.2 myself.  I love it.

--Travis





