gpt4 book ai didi

gcc - CMAKE_C_COMPILER 不是现有编译器工具的完整路径

转载 作者:行者123 更新时间:2023-12-02 07:47:50 34 4
gpt4 key购买 nike

我最近探索了 distcc,但无法使其工作。所以我

sudo apt-get remove distcc

之后,我收到错误

==> Processing catkin package: 'gencpp'
==> Building with env: '/opt/ros/kinetic/env.sh'
Makefile exists, skipping explicit cmake invocation...
==> make cmake_check_build_system in '/home/pi/ros_catkin_ws/build_isolated/gencpp'
-- The C compiler identification is unknown
-- The CXX compiler identification is unknown
CMake Error at CMakeLists.txt:2 (project):
The CMAKE_C_COMPILER:

/usr/local/bin/cc

is not a full path to an existing compiler tool.
Tell CMake where to find the compiler by setting either the environment
variable "CC" or the CMake cache entry CMAKE_C_COMPILER to the full path to the compiler, or to the compiler name if it is in the PATH.

CMake Error at CMakeLists.txt:2 (project):
The CMAKE_CXX_COMPILER:

/usr/local/bin/c++

is not a full path to an existing compiler tool.
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 "/home/pi/ros_catkin_ws/build_isolated/gencpp/CMakeFiles/CMakeOutput.log".
See also "/home/pi/ros_catkin_ws/build_isolated/gencpp/CMakeFiles/CMakeError.log".
Makefile:304: recipe for target 'cmake_check_build_system' failed
make: *** [cmake_check_build_system] Error 1
<== Failed to process package 'gencpp':
Command '['/opt/ros/kinetic/env.sh', 'make', 'cmake_check_build_system']' returned non-zero exit status 2

Reproduce this error by running:
==> cd /home/pi/ros_catkin_ws/build_isolated/gencpp && /opt/ros/kinetic/env.sh make cmake_check_build_system

Command failed, exiting.

我已经做到了

sudo apt-get install build_essential
sudo apt-get -f install
sudo apt-get update
sudo apt-get upgrade
export CC=/usr/local/bin/gcc
export CXX=/usr/local/bin/g++

但仍然遇到同样的错误。

如何解决此错误?我尝试重置符号链接(symbolic link)并删除导出

最佳答案

我认为您应该取消设置 CCCXX,或者至少使用系统编译器,如下所示(删除 /local):

export CC=/usr/bin/gcc
export CXX=/usr/bin/g++

关于gcc - CMAKE_C_COMPILER 不是现有编译器工具的完整路径,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45140273/

34 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com