ycm-core / YouCompleteMe

A code-completion engine for Vim
http://ycm-core.github.io/YouCompleteMe/
GNU General Public License v3.0
25.48k stars 2.81k forks source link

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

Closed ghost closed 8 years ago

ghost commented 8 years ago

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

micbou commented 8 years ago

Did you install the python-dev package?

ghost commented 8 years ago

@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).

micbou commented 8 years ago

What is the output of the command:

ldconfig -p | grep python

?

ghost commented 8 years ago

@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

micbou commented 8 years ago

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.

ghost commented 8 years ago

@micbou Thank you very much! it works!