YCM error. The ycmd server SHUT DOWN (restart wit…the instructions in the documentation

浪尽此生 提交于 2020-12-28 06:37:50

问题


I installed YCM with vim plug, but I may have shut down before process finished. Now when I start vim I get this error "The ycmd server SHUT DOWN (restart wit...the instructions in the documentation."

I've googled but can not find workable solution. I don't see anything in the documentation that helps. But I am new to vim and coding in general so may be missing something.

:YcmDebugInfo comes back with "Server errored, no debug info from server".

I have tried :YcmRestartServer, but to no result -- it pauses then returns the same error. I have also run :PlugInstall and :PlugUpdate, and all plug ins, including YCM, are coming back as up to date.


回答1:


I ran into the same issue with Vundle and fixed it like this:
After installing cmake, I cd'd into ~.vim/bundle/YouCompleteMe and ran python install.py




回答2:


Another problem that may cause that error is conda, you should run install.py from the python's system and not the conda one, to do that use

/usr/bin/python ./install.py

from the youcompleteme folder inside vim




回答3:


I was also facing the same problem with vim and I am using vim-plug plugin manager. To overcome this I did this:

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

Done !!!




回答4:


I was also facing the same issue but I have solved by executing the following commands in the Ubuntu terminal

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



回答5:


Here is how I did this recently with following environments

Mac OS Mojave 10.14.3

Vim 8.1.300

Python 3.7

Java version 1.8.0_40

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

Installed ycm with Vundle using Plugin 'Valloric/YouCompleteMe' and then running :PluginInstall

The plugins in downloaded to ~/.vim/bundle/YouCompleteMe

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

This creates appropriate files under /.vim/bundle/YouCompleteMe/third_party/ycmd/third_party/eclipse.jdt.ls (make sure these and inner directories are not owned by root unless you always work as a root)

now open vim and execute :YcmRestartServer

You should be good to go.

Try :YcmDebugInfo to check if everything is fine

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 release 7.6.1810 (Core)

Vim 8.1.1362

Python 3.7.3

Java openjdk version "1.8.0_191"

Overall process remains same, but I had couple of difficulties on Centos

  • Vim was not compiled with Python support
sudo vi /etc/ld.so.conf

added /usr/local/lib to it which had libpython3.7m.so.1.0 file

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=

Rest of the procedure remains the same.




回答6:


Here is how I have solved Mac OS Catalina 10.15.3 python 3.7 vim 8.2

Install ycm with 'Vim-plug' using Plug 'ycm-core/YouCompleteMe'

  1. cd ~/.vim/plugged/YouCompleteMe
  2. brew install cmake
  3. python ./install.py


来源:https://stackoverflow.com/questions/47667119/ycm-error-the-ycmd-server-shut-down-restart-wit-the-instructions-in-the-docu

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!