美文网首页
MacOS 底下vim出现YCM server shut dow

MacOS 底下vim出现YCM server shut dow

作者: Yao_Fairytale | 来源:发表于2020-12-10 12:04 被阅读0次

    最近遭遇YCM server shut down 错误,查看YouCompleteMe
    官方repo提供了新的安装步骤。

    第一步

    brew install cmake python mono go nodejs
    

    但是brew 安装的第一步就给我报错

    Error: Permission denied @ apply2files - /usr/local/share/ghostscript/9.50/Resource/Font/wasy10.pfb
    

    大概就是权限出错,于是我把整个文件夹的权限都给了,
    于是这个错误就解决了。

    sudo chown -R $(whoami): /usr/local/share/ghostscript 
    

    第二步,安装vim ,由于我已经安装了macvim不用管

    第三步,我是用vundle管理插件的,进入文件夹再编译一次插件。

     cd ~/.vim/plugged/YouCompleteMe
    python3 install.py --all
    

    然后我又得到了一堆错误(新下载的ycm不会有这些错误,是因为我没更新)

    npm ERR! code ENOENT
    npm ERR! syscall lstat
    npm ERR! path /Users/yao/.vim/plugged/YouCompleteMe/third_party/ycmd/third_party/tsserver
    npm ERR! errno -2
    npm ERR! enoent ENOENT: no such file or directory, lstat '/Users/yao/.vim/plugged/YouCompleteMe/third_party/ycmd/third_party/tsserver'
    npm ERR! enoent This is related to npm not being able to find a file.
    npm ERR! enoent 
    
    npm ERR! A complete log of this run can be found in:
    npm ERR!     /Users/yao/.npm/_logs/2020-12-10T03_59_33_483Z-debug.log
    

    然后用下面命令解决

    mkdir -p ~/.vim/bundle/YouCompleteMe/third_party/ycmd/third_party/tsserver/lib && npm install -g --prefix ~/.vim/bundle/YouCompleteMe/third_party/ycmd/third_party/tsserver typescript@3.9.7
    

    相关文章

      网友评论

          本文标题:MacOS 底下vim出现YCM server shut dow

          本文链接:https://www.haomeiwen.com/subject/lcilgktx.html