YouCompleteMe icon indicating copy to clipboard operation
YouCompleteMe copied to clipboard

CMake Error at ycm/CMakeLists.txt:92(file) file DOWNLOAD HASH mismatch

Open irvingow opened this issue 10 years ago • 10 comments

I install youcompleteme with some problems. My system is ubuntu 16.04LTS, as I went to the last step ./install.py --clang-completer there would be error as follow. I tried many times, the problems were all the same. Looking forward to your help, thx a lot.

Downloading Clang 3.9.0 CMake Error at ycm/CMakeLists.txt:92 (file): file DOWNLOAD HASH mismatch

for file: [/home/irvinglwj/.vim/bundle/YouCompleteMe/third_party/ycmd/cpp/../clang_archives/clang+llvm-3.9.0-x86_64-opensuse13.2.tar.xz]
  expected hash: [9153b473dc37d2e21a260231e90e43b97aba1dff5d27f14c947815a90fbdc8d7]
    actual hash: [e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855]
         status: [7;"Couldn't connect to server"]

xz: (stdin): 文件格式无法识别 tar: Child returned status 1 tar: Error is not recoverable: exiting now CMake Error at ycm/CMakeLists.txt:148 (message): You have not specified which libclang to use. You have several options:

  1. Set PATH_TO_LLVM_ROOT to a path to the root of a LLVM+Clang binary distribution. You can download such a binary distro from llvm.org. This is the recommended approach.

  2. Set USE_SYSTEM_LIBCLANG to ON; this makes YCM search for the system version of libclang.

  3. Set EXTERNAL_LIBCLANG_PATH to a path to whatever libclang.[so|dylib|dll] you wish to use.

    You HAVE to pick one option. See the docs for more information.

-- Configuring incomplete, errors occurred! See also "/tmp/ycm_build.nL9Jau/CMakeFiles/CMakeOutput.log". Traceback (most recent call last): File "/home/irvinglwj/.vim/bundle/YouCompleteMe/third_party/ycmd/build.py", line 359, in BuildYcmdLib subprocess.check_call( [ 'cmake' ] + full_cmake_args ) File "/usr/lib/python2.7/subprocess.py", line 541, in check_call raise CalledProcessError(retcode, cmd) CalledProcessError: Command '['cmake', '-G', 'Unix Makefiles', '-DPYTHON_LIBRARY=/usr/lib/python2.7/config-x86_64-linux-gnu/libpython2.7.so', '-DPYTHON_INCLUDE_DIR=/usr/include/python2.7', '-DUSE_CLANG_COMPLETER=ON', '-DUSE_PYTHON2=ON', '/home/irvinglwj/.vim/bundle/YouCompleteMe/third_party/ycmd/cpp']' returned non-zero exit status 1

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.

Traceback (most recent call last): File "./install.py", line 44, in Main() File "./install.py", line 33, 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', u'/home/irvinglwj/.vim/bundle/YouCompleteMe/third_party/ycmd/build.py', '--clang-completer']' returned non-zero exit status 1

irvingow avatar Sep 25 '16 12:09 irvingow

The problem is exactly what it says: it tries to download clang binaries and the downloaded file does not match the expected hash. So the contents are different; probably network error.

Not a bug with YCM so closing.

Valloric avatar Sep 25 '16 17:09 Valloric

Thank you very much! I have succeed.

irvingow avatar Sep 26 '16 14:09 irvingow

I've encountered this issue 3 times in a row, and the hash that I'm getting from the download is identical, each time, so not a network issue.

expected hash: [9153b473dc37d2e21a260231e90e43b97aba1dff5d27f14c947815a90fbdc8d7]
actual hash: [e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855]

If this issue needs to be raised with CLang, I would appreciate being pointed in the right direction.

khionu avatar Feb 27 '17 09:02 khionu

Err, my apologies, I do not have the same issue. I did not get a network error code. I'll look into this further

khionu avatar Feb 27 '17 09:02 khionu

@khionu the hash indicates the file is empty

sehe avatar Apr 19 '17 23:04 sehe

I have the same problem. But I don't know how to solve this problem.Help!

hellodt avatar Apr 25 '17 03:04 hellodt

I have the same problem.And I noticed that e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 is the hash value of empty file, so it is the network problem.

troyseed avatar Oct 09 '18 01:10 troyseed

Did you try downloading the file manually and placing it in YouCompleteMe/third_party/ycmd/clang_archives?

bstaletic avatar Oct 09 '18 10:10 bstaletic

Yes, I did and it works.

troyseed avatar Oct 09 '18 10:10 troyseed

thank you so much

lemoqo avatar Apr 04 '19 09:04 lemoqo