ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
Hi. I'm trying to install a python modules that is trying to build something using gcc, but it fails with:
/usr/bin/ld: cannot find -lpython2.7
libpython2.7.so happens to be in an unusually place on my system. I set LD_LIBRARY_PATH to exactly the correct place, but setup.py doesn't seem to care. How to I tell setup.py where it is supposed to find its shared libraries?
The problem is that I did a local Python installation on a system on which I don't have admin privileges, so I can't create symlinks in the normal spot. (They were using a really ancient version of Python, and I wanted the latest.) I used Nix to install Python locally, and I know exactly where it put the shared library, but I don't know how to get setup.py to use it.
I think that creating a local ~/bin directory an putting the correct value in it might work. You should, of course, make sure that your PATH value starts with ~/bin
Here's the standard values on my (old) laptop, running Fedora 18.
~ $ type -p python
~ $ file $(type -p python)
/usr/bin/python: symbolic link to `python2'
~ $ file $(type -p python2)
/usr/bin/python2: symbolic link to `python2.7'
~ $ file $(type -p python2.7)
/usr/bin/python2.7: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.32, BuildID[sha1]=0xf872fc2e1f49b9b747a4ebd45265dc72a707cb3e, stripped
Maybe I misunderstood your response, but I do not think it addresses my specific problem. I do not have any problems executing my custom version of Python. My PATH is already set correctly for that and the correct binary launches. The problem is that, when I try to build a module using "python setup.py", the setup.py program cannot find the custom version of the libpython2.7.so shared library. I know where it is, and I set LD_LIBRARY_PATH to make it available, but setup.py does not seem to be respecting this.