problems trying to build python 2.6 as a shared library
scubbojj at gmail.com
scubbojj at gmail.com
Sat Jan 19 00:47:12 EST 2013
On Friday, 25 September 2009 04:36:28 UTC-7, Marco Nawijn wrote:
> On Sep 25, 1:08 pm, Chris Withers <ch... at simplistix.co.uk> wrote:
> > Hi All,
> >
> > I'm trying to build Python 2.6 as a shared library, so I did:
> >
> > ./configure --enable-shared
> > make
> > make altinstall
> >
> > No obvious signs of failure, but when I try and use the resulting
> > python, I get:
> >
> > python2.6: error while loading shared libraries: libpython2.6.so.1.0:
> > cannot open shared object file: No such file or directory
> >
> > Why might that be?
> >
> > cheers,
> >
> > Chris
> >
> > --
> > Simplistix - Content Management, Batch Processing & Python Consulting
> > -http://www.simplistix.co.uk
>
> Hello Chris,
>
> The dynamic loader cannot find the python shared library. There are
> at least 2 options:
> 1. Add path that contains the shared library to the
> LD_LIBRARY_PATH environment variable. In a bash shell this can be
> accomplished by: export LD_LIBRARY_PATH=/path/to/python_shared_lib:
> $LD_LIBRARY_PATH
> 2. Add path to dynamic linker configuration file. This typically
> is in '/etc/ld.so.conf'. See man page for ld for more information.
>
> Note that I assumed that you are on a Unix/Linux machine.
>
> Regards,
>
> Marco
Could you elaborate on this for a Linux newbie please? I carried out step 1 with no problems, but when I view /etc/ld.so.conf, I get the following:
$ cat /etc/ld.so.conf
include ld.so.conf.d/*.conf
I don't know how to use ld - I see from the man pag that it's used for linking files, but I don't know (in this context) what files I want to be linking to what.
I've copied libpython2.7.so and libpython2.7.so.1.0 to the folder in $LD_LIBRARY_PATH, meaning I don't get the problems detailed in the original post anymore, but I'm concerned that I'm sticking a plaster over a bigger problem.
More information about the Python-list
mailing list