0

i installed python2.6 before in

/ust/local/bin

but now i removed it and installed a new python2.6.4 in

/opt/python2.6

i installed from the article

but on mid way only where they say to check python it says

[root@domain ~]# python
 /opt/python2.6/bin/python: error while loading shared libraries: libpython2.6.so.1.0: cannot open shared object file: No such file or directory

but when i open

/opt/python2.6/lib

i can found this file. please tell me whats wrong with this?

2

When you compile python2.6 with --prefix=/opt/python2.6, the binaries will be installed at /opt/python2.6/bin, the libraries at /opt/python2.6/lib, ...

/opt/python2.6/bin/python: error while loading shared libraries: libpython2.6.so.1.0: cannot open shared object file: No such file or directory

This error means that python is not looking at the path the file is in. So you need to add the library path to /etc/ld.so.conf file and activate it with ldconfig:

# echo "/opt/python2.6/lib" > /etc/ld.so.conf.d/libpython2.6.conf
# ldconfig
|improve this answer|||||
1

in Step 2 try add LDFLAGS with right path... for example

env LDFLAGS="-L/opt/python2.6/lib -R/opt/python2.6/lib" ./configure --prefix=/opt/python2.6 --with-threads --enable-shared
|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.