1

I just upgraded my system, in the process vim was itself updated to version 8.1 (from 8.0). Now every time I start vim the following error is displayed:

The ycmd server SHUT DOWN (restart with ':YcmRestartServer'). Unexpected error while loading the YCM core library. Type ':YcmToggleLogs ycmd_37049_stderr_x1nynwom.log' to check the logs.

The log file contains the following:

   Traceback (most recent call last):
     File "/home/duque004/.vim/bundle/YouCompleteMe/third_party/ycmd/ycmd/utils.py", line 498, in ImportAndCheckCore
       ycm_core = ImportCore()
     File "/home/duque004/.vim/bundle/YouCompleteMe/third_party/ycmd/ycmd/utils.py", line 489, in ImportCore
       import ycm_core as ycm_core
   ImportError: libpython3.6m.so.1.0: cannot open shared object file: No such file or directory

The Python version installed in this system is 3.8.2, no shared objects are available for version 3.6. How can vim be instructed to use the correct one?

  • 1
    Eh, maybe try reinstalling ycm? – D. Ben Knoble Jul 14 '20 at 12:53
  • I ran the Vundle installer already (:PluginInstall), but the error still appears. – Luís de Sousa Jul 14 '20 at 13:00
  • 1
    What about reinstalling vim? Seems like the python installation got updated, perhaps, and vim is still compiled to point to the old one? I’m no expert for vim’s python interface internals – D. Ben Knoble Jul 14 '20 at 14:42
  • 1
    You probably need to re-run the Python part of the YCM installation: github.com/ycm-core/… – filbranden Jul 14 '20 at 15:31
1

Following the hint from filbranden I got rid of the error message by recompiling the plugin via Python. Vundle must be run in first place, to guarantee the latest version is fetched from the repository. From normal mode:

:PluginInstall

Then in the shell compilation must be triggered manually:

cd ~/.vim/bundle/YouCompleteMe
python3 install.py --clang-completer --rust-completer
  • Consider switching from Vundle to vim-plug, which a more modern plug-in manager. One of its features is Post-Update Hooks, which allow you to set it up to run the install command for you when the plug-in is updated. (In your case, Plug 'ycm-core/YouCompleteMe', { 'do': 'python3 install.py --clang-completer --rust-completer' } should work. – filbranden Dec 13 '20 at 5:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.