ROS创建工作站时catkin-make报错,如何解决?

Base path: /home/a/catkin_ws
Source space: /home/a/catkin_ws/src
Build space: /home/a/catkin_ws/build
Devel space: /home/a/catkin_ws/devel
Install space: /home/a/catkin_ws/install
####
#### Running command: "cmake /home/a/catkin_ws/src -DCATKIN_DEVEL_PREFIX=/home/a/catkin_ws/devel -DCMAKE_INSTALL_PREFIX=/home/a/catkin_ws/install -G Unix Makefiles" in "/home/a/catkin_ws/build"
####
-- Using CATKIN_DEVEL_PREFIX: /home/a/catkin_ws/devel
-- Using CMAKE_PREFIX_PATH: /opt/ros/melodic
-- This workspace overlays: /opt/ros/melodic
-- Found PythonInterp: /usr/bin/python2 (found suitable version "2.7.17", minimum required is "2") 
-- Using PYTHON_EXECUTABLE: /usr/bin/python2
-- Using Debian Python package layout
-- Using empy: /usr/bin/empy
-- Using CATKIN_ENABLE_TESTING: ON
-- Call enable_testing()
-- Using CATKIN_TEST_RESULTS_DIR: /home/a/catkin_ws/build/test_results
-- Forcing gtest/gmock from source, though one was otherwise available.
-- Found gtest sources under '/usr/src/googletest': gtests will be built
-- Found gmock sources under '/usr/src/googletest': gmock will be built
CMake Deprecation Warning at /usr/src/googletest/CMakeLists.txt:1 (cmake_minimum_required):
  Compatibility with CMake < 2.8.12 will be removed from a future version of
  CMake.

  Update the VERSION argument  value or use a ... suffix to tell
  CMake that the project does not need compatibility with older versions.


CMake Deprecation Warning at /usr/src/googletest/googlemock/CMakeLists.txt:41 (cmake_minimum_required):
  Compatibility with CMake < 2.8.12 will be removed from a future version of
  CMake.

  Update the VERSION argument  value or use a ... suffix to tell
  CMake that the project does not need compatibility with older versions.


CMake Deprecation Warning at /usr/src/googletest/googletest/CMakeLists.txt:48 (cmake_minimum_required):
  Compatibility with CMake < 2.8.12 will be removed from a future version of
  CMake.

  Update the VERSION argument  value or use a ... suffix to tell
  CMake that the project does not need compatibility with older versions.


-- Found PythonInterp: /usr/bin/python2 (found version "2.7.17") 
-- Using Python nosetests: /usr/bin/nosetests-2.7
-- catkin 0.7.29
-- BUILD_SHARED_LIBS is on
/home/a/catkin_ws/devel/env.sh: 31: /tmp/setup.sh.QK42yeBb0j: Syntax error: Unterminated quoted string
Traceback (most recent call last):
  File "/home/a/catkin_ws/build/catkin_generated/generate_cached_setup.py", line 22, in 
    code = generate_environment_script('/home/a/catkin_ws/devel/env.sh')
  File "/opt/ros/melodic/lib/python2.7/dist-packages/catkin/environment_cache.py", line 62, in generate_environment_script
    output = subprocess.check_output([env_script, sys.executable, '-c', python_code])
  File "/usr/lib/python2.7/subprocess.py", line 223, in check_output
    raise CalledProcessError(retcode, cmd, output=output)
subprocess.CalledProcessError: Command '['/home/a/catkin_ws/devel/env.sh', '/usr/bin/python2', '-c', 'import os; print(dict(os.environ))']' returned non-zero exit status 2
CMake Error at /opt/ros/melodic/share/catkin/cmake/safe_execute_process.cmake:11 (message):
  execute_process(/usr/bin/python2
  "/home/a/catkin_ws/build/catkin_generated/generate_cached_setup.py")
  returned error code 1
Call Stack (most recent call first):
  /opt/ros/melodic/share/catkin/cmake/all.cmake:208 (safe_execute_process)
  /opt/ros/melodic/share/catkin/cmake/catkinConfig.cmake:20 (include)
  CMakeLists.txt:58 (find_package)


-- Configuring incomplete, errors occurred!
See also "/home/a/catkin_ws/build/CMakeFiles/CMakeOutput.log".
See also "/home/a/catkin_ws/build/CMakeFiles/CMakeError.log".
Invoking "cmake" failed

  • 文章:ros catkin_make问题解决 中也许有你想要的答案,请看下吧
  • 除此之外, 这篇博客: ROS catkin_make 编译不通过中的 问题描述: 部分也许能够解决你的问题, 你可以仔细阅读以下内容或跳转源博客中阅读:
  • 在确认代码没有出现问题的情况下,出现catkin_make编译不通过的问题