ycm-core / YouCompleteMe

A code-completion engine for Vim

Home Page:http://ycm-core.github.io/YouCompleteMe/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

install ycm in centos 8: glibc 2.29 not found

bethebest0622 opened this issue · comments

I am trying to install the newest ycm in my centos8 machine.

I updated vim to 9.0 with python3.9 support

everything goes well

but last step: python install.py --clang-completer

it works

but when i type vim:

the error comes with:

Traceback (most recent call last):
  File "/root/.vim/bundle/YouCompleteMe/third_party/ycmd/ycmd/utils.py", line 502, in ImportAndCheckCore
    ycm_core = ImportCore()
  File "/root/.vim/bundle/YouCompleteMe/third_party/ycmd/ycmd/utils.py", line 493, in ImportCore
    import ycm_core as ycm_core
ImportError: /usr/lib64/libm.so.6: version `GLIBC_2.29' not found (required by /root/.vim/bundle/YouCompleteMe/third_party/ycmd/cpp/../third_party/clang/lib/libclang.so.17)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib64/python3.9/runpy.py", line 197, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/usr/lib64/python3.9/runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "/root/.vim/bundle/YouCompleteMe/python/ycm/../../third_party/ycmd/ycmd/__main__.py", line 222, in <module>
    Main()
  File "/root/.vim/bundle/YouCompleteMe/python/ycm/../../third_party/ycmd/ycmd/__main__.py", line 185, in Main
    code = ImportAndCheckCore()
  File "/root/.vim/bundle/YouCompleteMe/third_party/ycmd/ycmd/utils.py", line 504, in ImportAndCheckCore
    LoadYcmCoreDependencies()
  File "/root/.vim/bundle/YouCompleteMe/third_party/ycmd/ycmd/utils.py", line 486, in LoadYcmCoreDependencies
    ctypes.cdll.LoadLibrary( libclang_path )
  File "/usr/lib64/python3.9/ctypes/__init__.py", line 452, in LoadLibrary
    return self._dlltype(name)
  File "/usr/lib64/python3.9/ctypes/__init__.py", line 374, in __init__
    self._handle = _dlopen(self._name, mode)
OSError: /usr/lib64/libm.so.6: version `GLIBC_2.29' not found (required by /root/.vim/bundle/YouCompleteMe/third_party/ycmd/third_party/clang/lib/libclang.so.17.0.1)

I think glibc is very low-level library, update it is very dangerous.
could you help on this? is there any settings i can use to solve this?

You will need to build clang from source, or install a clang-tools-extra package for your OS.

The pre-built versions of libclang and clangd are built on a ubuntu platform that uses later libc than RHEL.

Wo no longer recommend using --clang-completer - better to use clangd by setting g:ycm_clangd_binary_path to point to a version of clangd that works on your OS.

thanks for replying.

so i need to:

python3 install.py -g:ycm_clangd_binary_path?

sorry for the naive question, i am quite eager to use ycm

python3 install.py -g:ycm_clangd_binary_path?

No. g:ycm_clangd_binary_path goes in your vimrc. That should tell YCM where is your clangd.