YCM错误。 ycmd服务器SHUT DOWN(重新启动...文档中的说明

时间:2017-12-06 05:03:39

标签: vim youcompleteme

我用vim插头安装了YCM,但是在处理完成之前我可能已经关闭了。现在,当我启动vim时,我收到此错误“ycmd服务器SHUT DOWN(重启机智......文档中的说明。”

我用谷歌搜索但找不到可行的解决方案。我没有在文档中看到任何有用的内容。但是我对vim和编码很新,所以可能会遗漏一些东西。

:YcmDebugInfo返回“服务器错误,服务器没有调试信息”。

我试过:YcmRestartServer,但没有结果 - 它暂停然后返回相同的错误。我还运行:PlugInstall和:PlugUpdate,所有插件,包括YCM,都是最新的。

7 个答案:

答案 0 :(得分:33)

我和Vundle遇到了同样的问题并修复了这个问题:
安装cmake后,我进入〜.vim / bundle / YouCompleteMe并运行         python install.py

答案 1 :(得分:2)

另一个可能导致该错误的问题是conda,您应该在python系统上而不是conda上运行let withLet = (function() {throw 'error!'})() var withVar = (function() {throw 'error!'})() //VM2470:1 Uncaught error! //(anonymous) @ VM2470:1 //(anonymous) @ VM2470:1 withLet //VM2484:1 Uncaught ReferenceError: withLet is not defined at //<anonymous>:1:1 //(anonymous) @ VM2484:1 withVar //undefined let withLet = 'sth' //VM2520:1 Uncaught SyntaxError: Identifier 'withLet' has already been //declared //at <anonymous>:1:1 //(anonymous) @ VM2520:1 withVar = 'sth' //"sth" ,才能使用

install.py

从vim内的youcompleteme文件夹

答案 2 :(得分:2)

我也遇到了与vim相同的问题,并且我正在使用vim-plug插件管理器。为了克服这个问题,我这样做:

cd ~/.vim/plugged/youcompleteme
python3 install.py

完成!!!

答案 3 :(得分:0)

这是我最近在以下环境中执行的操作

Mac OS Mojave 10.14.3

Vim 8.1.300

Python 3.7

Java版本1.8.0_40

$vim --version | grep python
+comments          +libcall           -python            +viminfo
+conceal           +linebreak         +python3           +vreplace

使用ycmVundlePlugin 'Valloric/YouCompleteMe'一起安装,然后运行:PluginInstall

已将插件下载到~/.vim/bundle/YouCompleteMe

$cd  ~/.vim/bundle/YouCompleteMe
$python3 installer.py --java-completer

这会在/.vim/bundle/YouCompleteMe/third_party/ycmd/third_party/eclipse.jdt.ls下创建适当的文件(除非您始终以root身份工作,否则请确保这些目录和内部目录 不属于root)

现在打开vim并执行:YcmRestartServer

你应该很好。

尝试:YcmDebugInfo检查一切是否正常

Printing YouCompleteMe debug information...
-- Client logfile: /var/folders/t4/y8zpydv91sv2dszlb1_3qw_r0000gn/T/ycm_1xgp1ub9.log
-- Server Python interpreter: /usr/local/bin/python
-- Server Python version: 3.7.0
-- Server has Clang support compiled in: False
-- Clang version: None
-- Extra configuration file found but not loaded
-- Extra configuration path: ~/.vim/bundle/YouCompleteMe/third_party/ycmd/.ycm_extra_conf.py
-- Server running at: http://127.0.0.1:58050
-- Server process ID: 2334
-- Server logfiles:
--   /var/folders/t4/y8zpydv91sv2dszlb1_3qw_r0000gn/T/ycmd_58050_stdout_wzk9oksu.log
--   /var/folders/t4/y8zpydv91sv2dszlb1_3qw_r0000gn/T/ycmd_58050_stderr_xjb7zjn2.log

CentOS Linux版本7.6.1810(核心)

Vim 8.1.1362

Python 3.7.3

Java openjdk版本“ 1.8.0_191”

整个过程保持不变,但是我在Centos上遇到了一些困难

  • Vim没有在Python支持下编译
sudo vi /etc/ld.so.conf

向其中添加了/usr/local/lib文件的libpython3.7m.so.1.0

sudo ldconfig
git clone https://github.com/vim/vim.git
cd vim
./configure --prefix=/usr/local/ --enable-python3interp=yes --with-python3-command=/usr/local/bin/python --with-python3-config-dir=

其余步骤保持不变。

答案 4 :(得分:0)

我也面临着同样的问题,但是我已经通过在Ubuntu终端中执行以下命令解决了

cd ~/.vim/bundle/YouCompleteMe/
sudo pip install cmake
python install.py

答案 5 :(得分:0)

这就是我的解决方法 Mac OS卡塔利娜10.15.3 的Python 3.7 vim 8.2

使用“ ycm-core / YouCompleteMe”插件将ycm与“ Vim-plug”一起安装

  1. cd〜/ .vim / plugged / YouCompleteMe
  2. 酿造cmake
  3. python ./install.py

答案 6 :(得分:0)

$ cd ~/.vim/plugged/youcompleteme
$ bash install.sh
(or)
$ python3 install.py

只有安装了python3.7版本才能使用