YouCompleteMe on Arch Linux

After upgrading YouCompleteMe recently, it stopped working. My first thought was that the libraries needed rebuilding:

python --gocode-completer --clang-completer

The rebuild finished successfully, but each time I started vim I saw a message that the YCM server had crashed. I tried enabling logging with the following commands, but that didn’t work (it was crashing before anything could be logged)

let g:ycm_server_log_level = 'debug'
let g:ycm_server_keep_logfiles = 1
let g:ycm_server_use_vim_stdout = 0

It turns out that the issue was my use of python rather than python2 when building YouCompleteMe. To fix the issue, rebuild the library using python2 rather than python python2 –gocode-completer –clang-completer Once this is done, I added let g:ycm_path_to_python_interpreter = '/usr/bin/python2' to my .vimrc everything seems to be working great again.

If you get an error about libtinfo, you may need to install ncurses5-compat-libs via the AUR

Michael is a polyglot software engineer, committed to reducing complexity in systems and making them more predictable. Working with a variety of languages and tools, he shares his technical expertise to audiences all around the world at user groups and conferences. You can follow @mheap on Twitter

Thoughts on this post

Cherrot 2017-04-30

Thanks for sharing that!

Cherrot 2017-05-11

FYI, YCM is compatible with python3 now.

Leave a comment?

Leave a Reply