我想在ubuntu上的vim中配置YouCompleteMe插件。
按照网上的介绍,我已经通过git安装了vundle插件,并安装好了YouComplete,同时也安装了python-dev,clang,cmake.但是当我进入到~/.vim/bundle/YoucompleteMe中,执行./install.sh --clang-completer时出现错误
lucien@Lucien-PC:~/.vim/bundle/YouCompleteMe$ ./install.sh --clang-completer
/tmp/ycm_build.hxAUrv ~/.vim/bundle/YouCompleteMe
-- The C compiler identification is GNU
-- The CXX compiler identification is GNU
-- Check for working C compiler: /usr/bin/gcc
-- Check for working C compiler: /usr/bin/gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
Your C++ compiler supports C++11, compiling in that mode.
CMake Error at /usr/local/share/cmake-2.8/Modules/FindPackageHandleStandardArgs.cmake:70 (MESSAGE):
Could NOT find PythonLibs (missing: PYTHON_LIBRARIES PYTHON_INCLUDE_DIRS)
Call Stack (most recent call first):
/usr/local/share/cmake-2.8/Modules/FindPythonLibs.cmake:110 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
BoostParts/CMakeLists.txt:30 (find_package)
-- Configuring incomplete, errors occurred!
我看到错误提示,想当然的在~/.bashrc中声明了两个环境变量,
#Add for python
export PYTHON_LIBRARIES="/usr/lib/python2.7"
export PYTHON_INCLUDE_DIRS="/usr/include/python2.7"
你需要安装python2.7-dev
sudo apt-get install python2.7-dev
可以试试
clang_complete
效果还可以
需要安装python-devel