Please complete these steps and check these boxes (by putting an x inside
the brackets) _before_ filing your issue:
vim --version.:YcmDebugInfo.:YcmToggleLogs stderr.Thank you for adhering to this process! It ensures your issue is resolved
quickly and that neither your nor our time is needlessly wasted.
[If filing a bug report, please include a list of steps that describe how to
reproduce the bug you are experiencing. Also include test code if relevant.]
I have installed Ycm via Vundle on vim7.4 in Ubuntu 14.04 on VirtualBox.
Compiled it with --clang-completer option
After opening any cpp/hpp file I got error message like that:
The ycmd server SHUT DOWN (restart with ':YcmRestartServer'). Unexpected error while loading the YCM core library. Run ':YcmToggleLogs stderr' to check the logs.
After command :YcmToggleLogs
Traceback (most recent call last):
File "/home/rungo/.vim/bundle/YouCompleteMe/third_party/ycmd/ycmd/server_utils.py", line 95, in CompatibleWithCurrentCore
ycm_core = ImportCore()
File "/home/rungo/.vim/bundle/YouCompleteMe/third_party/ycmd/ycmd/server_utils.py", line 87, in ImportCore
import ycm_core as ycm_core
ImportError: /usr/lib/i386-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.20' not found (required by /home/rungo/.vim/bundle/YouCompleteMe/third_party/ycmd/ycmd/../libclang.so.3.8)
i checked that:
$ sudo apt-get install libstdc++6
Reading package lists... Done
Building dependency tree
Reading state information... Done
libstdc++6 is already the newest version.
That means that there is a mismatch between the version of libstdc++ required by the precompiled libclang that we download from the llvm site and the one you have installed. This is a bit strange since the one that we install is made for ubuntu 14.04 so there must be something wrong.
What is the output of strings /usr/lib/i386-linux-gnu/libstd++.so.6 | grep GLIBCXXX?
Thre is something strange...
$ sudo apt-get install libstdc++6
Reading package lists... Done
Building dependency tree
Reading state information... Done
libstdc++6 is already the newest version.
The following packages were automatically installed and are no longer required:
appmenu-qt appmenu-qt5 autopoint bamfdaemon friends friends-dispatcher
gir1.2-accounts-1.0 gir1.2-ebook-1.2 gir1.2-ebookcontacts-1.2
gir1.2-edataserver-1.2 gir1.2-messagingmenu-1.0 gir1.2-signon-1.0
gsettings-ubuntu-schemas indicator-appmenu indicator-bluetooth
indicator-datetime indicator-keyboard indicator-messages indicator-power
indicator-printers indicator-session indicator-sound
libaccount-plugin-generic-oauth libaccount-plugin-google libaudclient2
libbamf3-2 libcolumbus1 libcolumbus1-common libdbusmenu-qt5 libfriends0
libgee2 libglew1.10 libglewmx1.10 libgsettings-qt1 libid3tag0 libimlib2
liblightdm-gobject-1-0 liblua5.1-0 libntdb1 libnux-4.0-0 libnux-4.0-common
libpocketsphinx1 libsphinxbase1 libtimezonemap1 libunity-gtk2-parser0
libunity-gtk3-parser0 libunity-misc4 liburl-dispatcher1 libxmmsclient6
nux-tools python-ntdb python3-feedparser signon-keyring-extension
signon-plugin-oauth2 sphinx-voxforge-hmm-en sphinx-voxforge-lm-en
telepathy-indicator unity-greeter unity-lens-files unity-lens-friends
unity-lens-music unity-lens-photos unity-lens-video unity-scope-audacious
unity-scope-calculator unity-scope-chromiumbookmarks unity-scope-clementine
unity-scope-colourlovers unity-scope-devhelp unity-scope-firefoxbookmarks
unity-scope-gmusicbrowser unity-scope-gourmet unity-scope-guayadeque
unity-scope-home unity-scope-manpages unity-scope-musicstores
unity-scope-musique unity-scope-openclipart unity-scope-texdoc
unity-scope-tomboy unity-scope-video-remote unity-scope-virtualbox
unity-scope-yelp unity-scope-zotero unity-scopes-master-default
unity-scopes-runner
Use 'apt-get autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 3 not upgraded.
`$ strings /usr/lib/i386-linux-gnu/libstd++.so.6 | grep GLIBCXXX
strings: '/usr/lib/i386-linux-gnu/libstd++.so.6': No such file`
You are on Ubuntu 14.04 32-bit and since there is no Clang pre-built binaries available for this architecture, we use the binaries for Fedora 32-bit instead which seem to depend on a more recent version of libstdc++6. Try to update libstdc++6 by following these steps:
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt-get update
sudo apt-get install libstdc++6
@micbou i have installed packages as you said in your comment and now I have another problem
Traceback (most recent call last):
File "/home/rungo/.vim/bundle/YouCompleteMe/third_party/ycmd/ycmd/server_utils.py", line 95, in CompatibleWithCurrentCore
ycm_core = ImportCore()
File "/home/rungo/.vim/bundle/YouCompleteMe/third_party/ycmd/ycmd/server_utils.py", line 87, in ImportCore
import ycm_core as ycm_core
ImportError: /home/rungo/.vim/bundle/YouCompleteMe/third_party/ycmd/ycmd/../libclang.so.3.8: symbol _ZTVNSt7__cxx1115basic_stringbufIcSt11char_traitsIcESaIcEEE, version GLIBCXX_3.4.21 not defined in file libstdc++.so.6 with link time reference
My bad, you need to upgrade your packages, not just libstdc++6:
sudo apt-get upgrade
still the same problem
Did you run again the install.py script?
Yes, i did it again, still issue with libclang
One thing that you could do for sure is to follow the full guide and compile libclang yourself... I know is not an optimal solution...
Or you could try to sudo apt-get dist-upgrade. If this still doesn't work then you can upgrade to Ubuntu 16.04 or install a 64-bit version.
I am closing this since it is a configuration issue and we don't support Ubuntu 32-bit (only 64-bit).
I just saw this error on Ubuntu 17.04. The following command fixed it for me:
conda install libgcc
I got the idea from this thread.
Note: I did not perform the uninstall. The install upgraded the library and everything seems to be working now.
Another option that worked for me, as I used gcc-5.2(non system gcc) to compile ycm, is to copy libstdc++.so.6 to the third_party/ycmd folder
The system libstdc++.so.6 file didn't have the necessary tag required by ycore.so as this lib wasn't used during compile time.
System Ubuntu 14.04 64bit with gcc 4.6
centos 7.4 also have this promblem
For RHEL/Centos we have a wiki entry on how to make it work.
@bstaletic will you provide a link for RHEL/CentOS wiki? Thanks a lot
Click on the wiki tab. Then click on the "Full installation on CentOS".
https://github.com/ycm-core/YouCompleteMe/wiki/Full-installation-on-CentOS
Most helpful comment
centos 7.4 also have this promblem