Could not link test program to Python
johnsmeeth opened this issue · comments
I am using Archlinux. I meet an error when run ./configure: error:
Could not link test program to Python. Maybe the main Python library has been
installed in some non-standard library path. If so, pass it to configure,
via the LDFLAGS environment variable.
Example: ./configure LDFLAGS="-L/usr/non-standard-path/python/lib"
ERROR!
You probably have to install the development version of the Python package
for your distribution. The exact name of this package varies among them.
See `config.log' for more details
configure.
""
Did you try what it says to do?
i tried with: ./configure LDFLAGS="-L/usr/lib/python2.7" and
./configure LDFLAGS="-L/usr/lib/python3.4"
but that error still continue.
I just fixed it by run: ./configure PYTHON_LDFLAGS="-lpython3.4m"
Nice
Hi - I have also hit the same issue today when I tried the command "brew install --HEAD libimobiledevice" in OS X. Can you please suggest where can I find the "configure" command as I am unable to find it and as a result of it ./configure PYTHON_LDFLAGS="-lpython3.4m" command is failing.
as a result of it ./configure PYTHON_LDFLAGS="-lpython3.4m" command is failing.
Add -L/path/to/where/libpython/is
to PYTHON_LDFLAGS
so it knows where you have Python library installed.
P.S. Is this related to ZenCoding plugin or just some random question?
This message is not asking for the python libraries themselves, it's asking for the headers to link against them. You can install then with:
sudo apt-get install python-dev
@wacef That makes it work. Thanks!
I installed dev version and retried. But still same error, please help
configure: error: in `/home/osboxes/link-grammar-5.4.0':
configure:
Could not link test program to Python. Maybe the main Python library has been
installed in some non-standard library path. If so, pass it to configure,
via the LIBS environment variable.
Example: ./configure LIBS="-L/usr/non-standard-path/python/lib"
ERROR!
You probably have to install the development version of the Python package
for your distribution. The exact name of this package varies among them.
See `config.log' for more details
I used following for config:
osboxes@osboxes:~/link-grammar-5.4.0$ ./configure LDFLAGS="-L/usr/lib/python2.7"
@wacef Thanks it work
sudo apt-get install python-dev
This message is not asking for the python libraries themselves, it's asking for the headers to link against them. You can install then with:
sudo apt-get install python-dev
Awesome man
hi, but I have 2 python versions: 2.7 and already installed python3.6; whenn I run: "apt-get install python-dev" it runs for version 2.7 and not for 3.6, can I change it anything?
hi, but I have 2 python versions: 2.7 and already installed python3.6; whenn I run: "apt-get install python-dev" it runs for version 2.7 and not for 3.6, can I change it anything?
sudo apt-get install python3-dev