确保
- vim版本高于8.0 且设置仅支持python3(内存不足无法git clone -> link)
- python版本高于3.6(update-alternatives设置优先级)./configure时必须配置为–enable-shared 以生成动态库
- 安装cmake
- gcc、g++版本为8(因为步骤3要求支持c++17)
步骤
- 下载YCM源码(1、2反复使用gitee)
- git submodule update --init --recursive
- ./install.py --clang-completer
注意点
- ./configure配置时一定要添加–prefix=/目录来指定软件安装的位置
- 使用软链接ln -s 真实路径文件 操作路径文件(/usr/bin)
- 多版本时用update-alternatives设置优先级
- 使用dpkg -l | grep查看软件是否卸载干净
- sudo apt-get autoremove
- sudo dpkg --purge