zoukankan      html  css  js  c++  java
  • 打开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

        

  • 相关阅读:
    用PHP判断oicq是否在线的小程序
    我的PHP树的代码,可以嵌套任意层
    用PEAR来写你的下一个php程序(潘凡Night Sailer)(1)
    php在线文本编辑器
    分析HTML,并将结果存到一个数组中。看看里面的注释吧。:)
    聊天室php
    基于文件、数据库的计数器
    hust The mell hell
    UVA 10003 Cutting Sticks(区间DP)
    zoj 3197 Google Book(最小区间覆盖)
  • 原文地址:https://www.cnblogs.com/dakewei/p/10491373.html
Copyright © 2011-2022 走看看