Question 1:
Supplement, upgrade gcc,g++ to more than 4.7 version to install successfully
GitHub website
GitHub https://github.com/Valloric/YouCompleteMe#ubuntu-linux-x64
Question 2:
./install.py--clang-completer
Using Clang Archive:/root/.vim/bundle/youcompleteme/third_party/ycmd/cpp/. /clang_archives/clang+llvm-3.9.0-x86_64-opensuse13.2.tar.xz
Tar (child): Xz:cannot exec:no such file or directory
Tar (child): Error isn't recoverable:exiting now
Tar:child returned status 2
Tar:error isn't recoverable:exiting now
CMake Error at ycm/cmakelists.txt:164 (message):
You had 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.
You had to pick one option. See the docs for more information.
This error is now down the/root/.vim/bundle/youcompleteme/third_party/ycmd/clang_archives/clang+llvm-3.9.0-x86_64- OPENSUSE13.2.TAR.XZ clang_archives directory to be placed in the/ROOT/.VIM/BUNDLE/YOUCOMPLETEME/THIRD_PARTY/YCMD/CPP/LLVM directory, you can also make a soft connection
Vim/root/.vim/bundle/youcompleteme/third_party/ycmd/cpp/ycm/cmakelists.txt
New Opening first line:
Set (Path_to_llvm_root "/ROOT/.VIM/BUNDLE/YOUCOMPLETEME/THIRD_PARTY/YCMD/CPP/LLVM")
This method solves and finds that auto-completion is affected and recompiled, that is./install.py no parameters, I don't need cfailmy
The following method tried useless https://github.com/Valloric/YouCompleteMe/issues/1237
I ' ve tried to add the following lines to the top of.vim/bundle/YouCompleteMe/third_party/ycmd/cpp/CMakeLists.txt
set(CMAKE_C_COMPILER "gcc")set(CMAKE_CXX_COMPILER "g++")set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC" )set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC" )
But it ends the same.
Problems encountered by Vim Youcompleteme and its solution