系统环境:
OS:Ubuntu 22.04.1
1. Проблема возникает
Эта проблема случилась у автора при установке YouCompleteMe
плагина , но в интернете есть много знакомых, у которых эта проблема тоже по другим причинам.
imaginemiracle:YouCompleteMe$ python3 ./install.py
Searching Python 3.10 libraries...
#######library_dirs############
['/usr/lib/python3.10/config-3.10-x86_64-linux-gnu', '/usr/lib64', '/usr/lib']
#######library_dirs############
......
......
-- The C compiler identification is GNU 11.3.0
-- The CXX compiler identification is unknown
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
CMake Error at CMakeLists.txt:26 (project):
No CMAKE_CXX_COMPILER could be found.
Tell CMake where to find the compiler by setting either the environment
variable "CXX" or the CMake cache entry CMAKE_CXX_COMPILER to the full path
to the compiler, or to the compiler name if it is in the PATH.
-- Configuring incomplete, errors occurred!
See also "/tmp/ycm_build_1xto_wp_/CMakeFiles/CMakeOutput.log".
See also "/tmp/ycm_build_1xto_wp_/CMakeFiles/CMakeError.log".
ERROR: the build failed.
NOTE: it is *highly* unlikely that this is a bug but rather
that this is a problem with the configuration of your system
or a missing dependency. Please carefully read CONTRIBUTING.md
and if you're sure that it is a bug, please raise an issue on the
issue tracker, including the entire output of this script
and the invocation line used to run it.
2. Решения
Выполните следующую команду для установкиbuild-essential
imaginemiracle:~$ sudo apt-get update && sudo apt-get install build-essential
На данный момент моя собственная проблема решена.Согласно предыдущей установке проблем больше не будет.Однако возможно, что указанная выше ошибка появится только после установки этой.Это должно быть из- g++
за g++
.