• 编译ycm库


    在安装完YCM之后,重新打开vim还会出现如下的报错信息:ycm_client_support.[so|pyd|dll] and ycm_core.[so|pyd|dll] not detected; you need to compile YCM before using it. Read the docs!

    这个就可以通过在~/.vim/bundle/YouCompleteMe,即你的YCM目录下,加入如下命令解决:

    [plain] view plaincopy
     
    1. ./install.sh --clang-completer  
    
    
    

    然后可能还会出现报错:Some folders in /home/sky-tm/.vim/bundle/YouCompleteMe/third_party/ycmd/third_party are empty; you probably forgot to run:    git submodule update --init --recursive怎么办?

    莫慌,按照提示来:

    继续输入命令:

     git submodule update --init --recursive

    然后就等它更新完成。

    然后,再输入:

    [plain] view plaincopy
     
    1. ./install.sh --clang-completer  

    如果这是时候会出现这样的情况:

    主要就是:

    -- Configuring incomplete, errors occurred!
    See also "/tmp/ycm_build.mI4VZH/CMakeFiles/CMakeOutput.log".

    CMake Error at /usr/share/cmake-2.8/Modules/FindPackageHandleStandardArgs.cmake:108 (message):
      Could NOT find PythonLibs (missing: PYTHON_LIBRARIES PYTHON_INCLUDE_DIRS)
      (Required is at least version "2.6")
    Call Stack (most recent call first):
      /usr/share/cmake-2.8/Modules/FindPackageHandleStandardArgs.cmake:315 (_FPHSA_FAILURE_MESSAGE)
      /usr/share/cmake-2.8/Modules/FindPythonLibs.cmake:208 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
      BoostParts/CMakeLists.txt:30 (find_package)

    这是因为python安装的不完全导致的,因为python3和python2是不兼容的。

    这时候我们要怎么办呢?

    我用了最简单粗暴的方法:

    [plain] view plaincopy
     
    1. sudo apt-get install python-dev  
    2. 然后再用命令(注意要在YCM目录下):  
    3. ./install.sh --clang-completer  
    
    
    

    再出现了一堆进度提示之后就有了下面三行:

    [100%] Built target ycm_core
    Scanning dependencies of target ycm_support_libs
    [100%] Built target ycm_support_libs


    这样就表示成功啦。

  • 相关阅读:
    iOS开发 贝塞尔曲线UIBezierPath
    iOS开发 解决使用AVAudioRecorder录制后转mp3解决音量小的问题
    比JDK高效的array equals
    高性能web架构原则
    基于内存映射的千万级数据处理框架
    LesenRPC-基于netty/protobuffer的高性能RPC框架
    java垃圾回收机制详解
    MVC架构详解
    用抽象实现代码解耦
    python按年份统计文件数量
  • 原文地址:https://www.cnblogs.com/chris-cp/p/4992553.html
Copyright © 2020-2023  润新知