ros noetic catkin_make 失败解决方法

问题:

ros noetic catkin_make 失败:

(base) alex@ubuntu-16-04:~/catkin$ catkin_make
Base path: /home/alex/catkin
Source space: /home/alex/catkin/src
Build space: /home/alex/catkin/build
Devel space: /home/alex/catkin/devel
Install space: /home/alex/catkin/install
####
#### Running command: "cmake /home/alex/catkin/src -DCATKIN_DEVEL_PREFIX=/home/alex/catkin/devel -DCMAKE_INSTALL_PREFIX=/home/alex/catkin/install -G Unix Makefiles" in "/home/alex/catkin/build"
####
-- The CXX compiler identification is GNU 9.3.0
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Using CATKIN_DEVEL_PREFIX: /home/alex/catkin/devel
-- Using CMAKE_PREFIX_PATH: /opt/ros/noetic
-- This workspace overlays: /opt/ros/noetic
-- Found PythonInterp: /home/alex/anaconda3/bin/python3 (found suitable version "3.8.8", minimum required is "3") 
-- Using PYTHON_EXECUTABLE: /home/alex/anaconda3/bin/python3
-- Using Debian Python package layout
-- Could NOT find PY_em (missing: PY_EM) 
CMake Error at /opt/ros/noetic/share/catkin/cmake/empy.cmake:30 (message):
  Unable to find either executable 'empy' or Python module 'em'...  try
  installing the package 'python3-empy'
Call Stack (most recent call first):
  /opt/ros/noetic/share/catkin/cmake/all.cmake:164 (include)
  /opt/ros/noetic/share/catkin/cmake/catkinConfig.cmake:20 (include)
  CMakeLists.txt:58 (find_package)


-- Configuring incomplete, errors occurred!
See also "/home/alex/catkin/build/CMakeFiles/CMakeOutput.log".
See also "/home/alex/catkin/build/CMakeFiles/CMakeError.log".

python依赖empy,于是通过pip安装:

base) alex@ubuntu-16-04:~/catkin$ pip install empy
Collecting empy
  Downloading empy-3.3.4.tar.gz (62 kB)
     |████████████████████████████████| 62 kB 83 kB/s 
Building wheels for collected packages: empy
  Building wheel for empy (setup.py) ... done
  Created wheel for empy: filename=empy-3.3.4-py3-none-any.whl size=29330 sha256=63c13546baef652d25a46202986771de15544ec6536ba34bc6be7e99ba48fe98
  Stored in directory: /home/alex/.cache/pip/wheels/b0/d7/80/0e8ad4f073e05b2435c3b4c12c230cb219135bae4f59978612
Successfully built empy
Installing collected packages: empy
Successfully installed empy-3.3.4

再测试仍然失败,提示catkin_pkg未安装

(base) alex@ubuntu-16-04:~/catkin$ catkin_make
Base path: /home/alex/catkin
Source space: /home/alex/catkin/src
Build space: /home/alex/catkin/build
Devel space: /home/alex/catkin/devel
Install space: /home/alex/catkin/install
####
#### Running command: "cmake /home/alex/catkin/src -DCATKIN_DEVEL_PREFIX=/home/alex/catkin/devel -DCMAKE_INSTALL_PREFIX=/home/alex/catkin/install -G Unix Makefiles" in "/home/alex/catkin/build"
####
-- Using CATKIN_DEVEL_PREFIX: /home/alex/catkin/devel
-- Using CMAKE_PREFIX_PATH: /opt/ros/noetic
-- This workspace overlays: /opt/ros/noetic
-- Using PYTHON_EXECUTABLE: /home/alex/anaconda3/bin/python3
-- Using Debian Python package layout
-- Found PY_em: /home/alex/anaconda3/lib/python3.8/site-packages/em.py  
-- Using empy: /home/alex/anaconda3/lib/python3.8/site-packages/em.py
-- Using CATKIN_ENABLE_TESTING: ON
-- Call enable_testing()
-- Using CATKIN_TEST_RESULTS_DIR: /home/alex/catkin/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
-- Found PythonInterp: /home/alex/anaconda3/bin/python3 (found version "3.8.8") 
-- Found Threads: TRUE  
-- Using Python nosetests: /usr/bin/nosetests3
ImportError: "from catkin_pkg.package import parse_package" failed: No module named 'catkin_pkg'
Make sure that you have installed "catkin_pkg", it is up to date and on the PYTHONPATH.
CMake Error at /opt/ros/noetic/share/catkin/cmake/safe_execute_process.cmake:11 (message):
  execute_process(/home/alex/anaconda3/bin/python3
  "/opt/ros/noetic/share/catkin/cmake/parse_package_xml.py"
  "/opt/ros/noetic/share/catkin/cmake/../package.xml"
  "/home/alex/catkin/build/catkin/catkin_generated/version/package.cmake")
  returned error code 1
Call Stack (most recent call first):
  /opt/ros/noetic/share/catkin/cmake/catkin_package_xml.cmake:74 (safe_execute_process)
  /opt/ros/noetic/share/catkin/cmake/all.cmake:168 (_catkin_package_xml)
  /opt/ros/noetic/share/catkin/cmake/catkinConfig.cmake:20 (include)
  CMakeLists.txt:58 (find_package)


-- Configuring incomplete, errors occurred!
See also "/home/alex/catkin/build/CMakeFiles/CMakeOutput.log".
See also "/home/alex/catkin/build/CMakeFiles/CMakeError.log".

继续安装

(base) alex@ubuntu-16-04:~/catkin$ pip install catkin_pkg
Collecting catkin_pkg
  Downloading catkin_pkg-0.4.24-py3-none-any.whl (75 kB)
     |████████████████████████████████| 75 kB 19 kB/s 
Requirement already satisfied: pyparsing in /home/alex/anaconda3/lib/python3.8/site-packages (from catkin_pkg) (2.4.7)
Requirement already satisfied: docutils in /home/alex/anaconda3/lib/python3.8/site-packages (from catkin_pkg) (0.17.1)
Requirement already satisfied: python-dateutil in /home/alex/anaconda3/lib/python3.8/site-packages (from catkin_pkg) (2.8.1)
Requirement already satisfied: six>=1.5 in /home/alex/anaconda3/lib/python3.8/site-packages (from python-dateutil->catkin_pkg) (1.15.0)
Installing collected packages: catkin-pkg
Successfully installed catkin-pkg-0.4.24

再次测试成功:

base) alex@ubuntu-16-04:~/catkin$ catkin_mak

Command 'catkin_mak' not found, did you mean:

  command 'catkin_make' from deb catkin (0.8.0-1ubuntu2)

Try: sudo apt install <deb name>

(base) alex@ubuntu-16-04:~/catkin$ catkin_make
Base path: /home/alex/catkin
Source space: /home/alex/catkin/src
Build space: /home/alex/catkin/build
Devel space: /home/alex/catkin/devel
Install space: /home/alex/catkin/install
####
#### Running command: "cmake /home/alex/catkin/src -DCATKIN_DEVEL_PREFIX=/home/alex/catkin/devel -DCMAKE_INSTALL_PREFIX=/home/alex/catkin/install -G Unix Makefiles" in "/home/alex/catkin/build"
####
-- Using CATKIN_DEVEL_PREFIX: /home/alex/catkin/devel
-- Using CMAKE_PREFIX_PATH: /opt/ros/noetic
-- This workspace overlays: /opt/ros/noetic
-- Found PythonInterp: /home/alex/anaconda3/bin/python3 (found suitable version "3.8.8", minimum required is "3") 
-- Using PYTHON_EXECUTABLE: /home/alex/anaconda3/bin/python3
-- Using Debian Python package layout
-- Using empy: /home/alex/anaconda3/lib/python3.8/site-packages/em.py
-- Using CATKIN_ENABLE_TESTING: ON
-- Call enable_testing()
-- Using CATKIN_TEST_RESULTS_DIR: /home/alex/catkin/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
-- Found PythonInterp: /home/alex/anaconda3/bin/python3 (found version "3.8.8") 
-- Using Python nosetests: /usr/bin/nosetests3
-- catkin 0.8.10
-- BUILD_SHARED_LIBS is on
-- BUILD_SHARED_LIBS is on
-- Configuring done
-- Generating done
-- Build files have been written to: /home/alex/catkin/build
####
#### Running command: "make -j4 -l4" in "/home/alex/catkin/build"
####

  • 6
    点赞
  • 12
    收藏
    觉得还不错? 一键收藏
  • 3
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 3
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值