安装YouCompleteMe,在进行./install.py --clang-completer命令时报以下错误
-- Found PythonLibs: /usr/lib64/python2.7/config/libpython2.7.so (found suitable version "2.7.5", minimum required is "2.7")
-- Downloading libclang 7.0.0 from https://dl.bintray.com/micbou/libclang/libclang-7.0.0-x86_64-unknown-linux-gnu.tar.bz2
CMake Error at ycm/CMakeLists.txt:107 (file):
file DOWNLOAD HASH mismatch
for file: [/root/.vim/bundle/YouCompleteMe/third_party/ycmd/cpp/../clang_archives/libclang-7.0.0-x86_64-unknown-linux-gnu.tar.bz2]
expected hash: [54198c9f941cb32f5915698d3ce11effc5a2985fcfe58c3b42532233bc942a23]
actual hash: [e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855]
status: [1;"Unsupported protocol"]
CMake Error at ycm/CMakeLists.txt:123 (message):
Cannot find path to libclang in prebuilt binaries
-- Configuring incomplete, errors occurred!
See also "/tmp/ycm_build_SKVcaK/CMakeFiles/CMakeOutput.log".
ERROR: the build failed.
NOTE: it is *highly* unlikely that this is a bug but rather
that this is a problem with the configuration of your system
or a missing dependency. Please carefully read CONTRIBUTING.md
and if you're sure that it is a bug, please raise an issue on the
issue tracker, including the entire output of this script
and the invocation line used to run it.
解决:
进入到指定目录
cd /root/.vim/bundle/YouCompleteMe/third_party/ycmd/clang_archives
改原来文件名,任意名字
mv libclang-7.0.0-x86_64-unknown-linux-gnu.tar.bz2 mlibclang-7.0.0-x86_64-unknown-linux-gnu.tar.bz2
重新下载文件
wget https://dl.bintray.com/micbou/libclang/libclang-7.0.0-x86_64-unknown-linux-gnu.tar.bz2
然后重新回到/root/.vim/bundle/YouCompleteMe目录下执行./install.py --clang-completer