YCM error. The ycmd server SHUT DOWN (restart wit...the instructions in the documentation
Asked Answered
J

9

51

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.

Jarrodjarrow answered 6/12, 2017 at 5:3 Comment(1)
it would be greatly helpful if you also give the log or debug info along with OS and other environment details.Feudist
B
88

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

Busman answered 2/3, 2018 at 13:56 Comment(2)
I couldn't run it but after I installed python-devel packages then it works fine thanks.Rosaleerosaleen
This fails on vim 8.2. Cmake seems to be expecting an olde r Python version and exits with an error.Newsome
I
13

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 !!!

Ignatia answered 19/3, 2020 at 15:53 Comment(1)
I use Vundle so for me it was cd ~/.vim/bundle/YouCompleteMeWeakkneed
P
12

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

Pacificism answered 17/1, 2019 at 8:21 Comment(2)
Quite similarly pyenv introduce shims which when invoking the python binary rely on static Python library instead of dynamic ones. Solution is to use the system Python with /usr/bin/python as suggested by Mike in his answer.Virgule
Thanks, this worked for me in 2023 -- had the same issue with Anaconda.Papaveraceous
E
8

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

or

cd ~/.vim/bundle/YouCompleteMe/
sudo pip3 install cmake
python3 install.py
Exact answered 24/8, 2019 at 1:21 Comment(2)
Thanks. I used your code with one modification:sudo pip3 install cmake. In most system, pip3 is used along with python3.Girard
thanks for your update. when i have used at that time pip was working but now in new systems comes with pip3 as default. thanks for your commentExact
A
3

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
Artichoke answered 27/2, 2020 at 14:0 Comment(0)
P
2

2023:

  • macOS Monterey
  • Anaconda
  • Python installed with homebrew

Had to :

cd ~/.vim/bundle/YouCompleteMe/
# DONT use conda python in the following install step
/opt/homebrew/bin/python3 ./install.py
Papaveraceous answered 20/1, 2023 at 11:38 Comment(1)
I was in the same situation. this helped.Kallick
G
1
$ cd ~/.vim/plugged/youcompleteme
$ bash install.sh
(or)
$ python3 install.py

It will only work if you have installed the python3.7 version

Glorification answered 11/2, 2021 at 7:20 Comment(1)
you may add some explanation that how this code is the answer of the question.Myogenic
F
0

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.

Feudist answered 21/5, 2019 at 20:36 Comment(0)
K
0

I had a very similar issue and fixed it today. Here's what I've done

  • Install YCM's requirement in vundle

    cd ~/.vim/bundle/YouCompleteMe; python3 install.py

  • Reproduce the problem, then check its log in vi mode. The error I had reads

    Traceback (most recent call last): File ImportAndCheckCore ycm_core = Import Core() File /.vim/bundle/YouCompleteMe/third_party/ycmd/ycmd/utils.py", line 493, in ImportCore import ycm_core as ycm_core ImportError: ~/miniconda3/lib/libstdc++.so.6: version 'GLIBCXX_3.4.30' not found

  • Check whether libstdc++.so.6 contains GLIBCXX_3.4.30, but receive GLIBCXX_3.4.2x which apparently doesn't satisfy the dependency

    strings ~/miniconda3/lib/libstdc++.so.6 | grep GLIBCXX_3.4.30
    GLIBCXX_3.4.2x
    
  • Then seek the correct libstdc++.so.6 that contains the expected GLIBCXX_3.4.30

    sudo find /usr -type f -name "libstdc++.so.6*"
    /usr/lib64/libstdc++.so.6.0.30
    
    strings /usr/lib64/libstdc++.so.6.0.30 | grep GLIBCXX_3.4.30
    GLIBCXX_3.4.30
    
  • Copy /usr/lib64/libstdc++.so.6.0.30 and create a softlink to ~/miniconda3/lib/libstdc++.so.6


Edited on 20230606

On 6.1.31-1-MANJARO, the same problem got fixed after running cd ~/.vim/bundle/YouCompleteMe; python3 install.py

Knighterrantry answered 14/4, 2023 at 15:28 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.