Youcompleteme: Ubuntu16.04 compile error: unable to find an appropriate Python library.

Created on 11 May 2016  路  6Comments  路  Source: ycm-core/YouCompleteMe

Searching Python 2.7 libraries...
ERROR: unable to find an appropriate Python library.
Traceback (most recent call last):
File "./install.py", line 32, in
Main()
File "./install.py", line 21, in Main
subprocess.check_call( [ python_binary, build_file ] + sys.argv[1:] )
File "/usr/lib/python2.7/subprocess.py", line 541, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['/usr/bin/python', '/home/snail/.vim/bundle/YouCompleteMe/third_party/ycmd/build.py', '--clang-completer']' returned non-zero exit status 1

Most helpful comment

I am not sure why but your configuration is missing the following symbolic link:

/usr/lib/x86_64-linux-gnu/libpython2.7.so -> libpython2.7.so.1

You need to reinstall the libpython2.7-dev package:

sudo apt-get install --reinstall libpython2.7-dev

Update the shared libraries cache:

sudo ldconfig

and run again the install.py script.

All 6 comments

Did you install the python-dev package?

@micbou yes, i did.
python-dev is already the newest version (2.7.11-1).
python3-dev is already the newest version (3.5.1-3).

What is the output of the command:

ldconfig -p | grep python

?

@micbou
libpython3.5m.so.1.0 (libc6,x86-64) => /usr/lib/x86_64-linux-gnu/libpython3.5m.so.1.0
libpython2.7.so.1.0 (libc6,x86-64) => /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0

I am not sure why but your configuration is missing the following symbolic link:

/usr/lib/x86_64-linux-gnu/libpython2.7.so -> libpython2.7.so.1

You need to reinstall the libpython2.7-dev package:

sudo apt-get install --reinstall libpython2.7-dev

Update the shared libraries cache:

sudo ldconfig

and run again the install.py script.

@micbou Thank you very much! it works!

Was this page helpful?
0 / 5 - 0 ratings