打开vi后提示The ycmd server SHUT DOWN (restart with :YcmRestartServer)该如何处理

答:进入YouCompleteMe的安装目录安装一些必要的依赖

  比如:笔者将YouCompleteMe安装到了~/.vim/bundle目录下,那么执行以下操作:

  cd ~/.vim/bundle/YouCompleteMe

  ./install.py --clang-completer --system-libclang

  (如果出现安装失败,请尝试添加选项--no-regex,也就是./install.py --clang-completer --system-libclang --no-regex)

 

补充:

  1. Q: 出现以下错误:

      ERROR: Unable to find executable 'cmake'. CMake is required to build ycmd

  A: 请安装cmake

      ubuntu下的安装方法: sudo apt-get install cmake -y

 

  2. Q: 出现以下错误: 

          CMake Error at ycm/CMakeLists.txt:330 (message):
          Using Clang completer, but no libclang found. Try setting
          EXTERNAL_LIBCLANG_PATH or revise your configuration

  A: 请安装libclang开发库

   ubuntu下的安装方法: sudo apt-get install libclang-dev -y

 

  3. Q: 出现以下错误: 

           fatal error: Python.h: No such file or directory
           compilation terminated.
           ycm/CMakeFiles/ycm_core.dir/build.make:182: recipe for target 'ycm/CMakeFiles/ycm_core.dir/ClangCompleter/ClangHelpers.cpp.o' failed

  A: 安装python开发库

      ubuntu下的安装方法: sudo apt-get install libpython-dev -y

 

  4. Q: 出现以下错误:

    No .ycm_extra_conf.py file detected, so no compile flags are available. Thus no semantic support for C/C++/ObjC/ObjC++

      A:

    4.1 将配置文件复制到对应的目录中

    mkdir ~/.vim/bundle/YouCompleteMe/cpp/ycm -p

    cp ~/.vim/bundle/YouCompleteMe/third_party/ycmd/examples/.ycm_extra_conf.py ~/.vim/bundle/YouCompleteMe/cpp/ycm

    4.2 配置.vimrc

    echo "let g:ycm_global_ycm_extra_conf='~/.vim/bundle/YouCompleteMe/cpp/ycm/.ycm_extra_conf.py'" >> ~/.vimrc

    

转载于:https://www.cnblogs.com/dakewei/p/10491373.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值