墨色玫瑰 2020-02-19 17:01 采纳率: 0%
浏览 779

全新空工作空间catkin编译出错,无法识别c编译器

新建一个工作空间,执行catkin_make的时候,提示**The C compiler identification is unknown**,接下来就发生错误,编译失败,错误是**CMake Error at /usr/share/cmake-3.5/Modules/CMakeTestCCompiler.cmake:61 (message):The C compiler "/usr/bin/cc" is not able to compile a simple test program.**, 完整的编译输出如下:

Base path: /home/inky/t                                                              Source space: /home/inky/t/src                                                       Build space: /home/inky/t/build                                                      Devel space: /home/inky/t/devel                                                      Install space: /home/inky/t/install                                                  ####                                                                                 #### Running command: "cmake /home/inky/t/src -DCATKIN_DEVEL_PREFIX=/home/inky/t/devel -DCMAKE_INSTALL_PREFIX=/home/inky/t/install -G Unix Makefiles" in "/home/inky/t/build"                                                                                  ####                                                                                 -- The C compiler identification is unknown                                          -- The CXX compiler identification is GNU 5.4.0                                      -- Check for working C compiler: /usr/bin/cc                                         -- Check for working C compiler: /usr/bin/cc -- broken                               CMake Error at /usr/share/cmake-3.5/Modules/CMakeTestCCompiler.cmake:61 (message):     The C compiler "/usr/bin/cc" is not able to compile a simple test program.                                                                                                It fails with the following output:                                                                                                                                        Change Dir: /home/inky/t/build/CMakeFiles/CMakeTmp                                                                                                                                                                                                                                                                                                 Run Build Command:"/usr/bin/make" "cmTC_6a4d8/fast"                                                                                                                       /usr/bin/make -f CMakeFiles/cmTC_6a4d8.dir/build.make                                CMakeFiles/cmTC_6a4d8.dir/build                                                                                                                                           make[1]: Entering directory '/home/inky/t/build/CMakeFiles/CMakeTmp'                                                                                                      Building C object CMakeFiles/cmTC_6a4d8.dir/testCCompiler.c.o                                                                                                             /usr/bin/cc -o CMakeFiles/cmTC_6a4d8.dir/testCCompiler.c.o -c                        /home/inky/t/build/CMakeFiles/CMakeTmp/testCCompiler.c                                                                                                                    CMakeFiles/cmTC_6a4d8.dir/build.make:65: recipe for target                           'CMakeFiles/cmTC_6a4d8.dir/testCCompiler.c.o' failed                                                                                                                      make[1]: *** [CMakeFiles/cmTC_6a4d8.dir/testCCompiler.c.o] Error 1                                                                                                        make[1]: Leaving directory '/home/inky/t/build/CMakeFiles/CMakeTmp'                                                                                                       Makefile:126: recipe for target 'cmTC_6a4d8/fast' failed                                                                                                                  make: *** [cmTC_6a4d8/fast] Error 2                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           CMake will not be able to correctly generate this project.                         Call Stack (most recent call first):                                                   CMakeLists.txt                                                                                                                                                                                                                                               -- Configuring incomplete, errors occurred!                                          See also "/home/inky/t/build/CMakeFiles/CMakeOutput.log".                            See also "/home/inky/t/build/CMakeFiles/CMakeError.log".                             Invoking "cmake" failed 











请问有谁能看出这是什么问题吗?
我试过更新和重装gcc,更新和重装make和cmake,但是都没有效果,我在其他地方克隆来的一个项目却能够正常编译,这个问题困扰我有几天了。

  • 写回答

1条回答 默认 最新

  • a15645639089 2020-07-10 11:28
    关注

    刚刚遇到了和你一样的问题,最后把工作空间删除了,在home路经下重新建了个空间就解决了

    评论

报告相同问题?

悬赏问题

  • ¥15 一道python难题2
  • ¥15 一道python难题
  • ¥15 用matlab 设计一个不动点迭代法求解非线性方程组的代码
  • ¥15 牛顿斯科特系数表表示
  • ¥15 arduino 步进电机
  • ¥20 程序进入HardFault_Handler
  • ¥15 oracle集群安装出bug
  • ¥15 关于#python#的问题:自动化测试
  • ¥20 问题请教!vue项目关于Nginx配置nonce安全策略的问题
  • ¥15 教务系统账号被盗号如何追溯设备