执行 catkin_make 时出错:调用“make -j1 -l1”失败
Posted
技术标签:
【中文标题】执行 catkin_make 时出错:调用“make -j1 -l1”失败【英文标题】:Error executing catkin_make: Invoking "make -j1 -l1" failed 【发布时间】:2020-04-22 13:25:46 【问题描述】:我是 ROS 新手,遇到了 catkin_make 的问题。起初它工作正常,在 catkin 工作区 (catkin_ws) 中执行它时。然后我在 src 中创建了一个名为 rosjava 的 catkin 包,没有依赖项(catkin_create_pkg rosjava)并且 catkin_make 开始失败:
~/catkin_ws$ catkin_make
Base path: /home/jon/catkin_ws
Source space: /home/jon/catkin_ws/src
Build space: /home/jon/catkin_ws/build
Devel space: /home/jon/catkin_ws/devel
Install space: /home/jon/catkin_ws/install
####
#### Running command: "make cmake_check_build_system" in "/home/jon/catkin_ws/build"
####
####
#### Running command: "make -j1 -l1" in "/home/jon/catkin_ws/build"
####
[ 0%] Built target _arbotix_msgs_generate_messages_check_deps_Digital
[ 0%] Built target _arbotix_msgs_generate_messages_check_deps_SetupChannel
[ 0%] Built target _arbotix_msgs_generate_messages_check_deps_Relax
[ 0%] Built target _arbotix_msgs_generate_messages_check_deps_Analog
[ 0%] Built target _arbotix_msgs_generate_messages_check_deps_SetSpeed
[ 0%] Built target std_msgs_generate_messages_nodejs
[ 0%] Built target _arbotix_msgs_generate_messages_check_deps_Enable
[ 3%] Built target arbotix_msgs_generate_messages_nodejs
[ 3%] Built target std_msgs_generate_messages_py
[ 7%] Built target arbotix_msgs_generate_messages_py
[ 8%] Generating Java gradle project from arbotix_msgs
Traceback (most recent call last):
File "/opt/ros/kinetic/share/genjava/cmake/../../../lib/genjava/genjava_gradle_project.py", line 11, in <module>
import genjava
File "/opt/ros/kinetic/lib/python2.7/dist-packages/genjava/__init__.py", line 39, in <module>
from .genjava_main import main, standalone_main
File "/opt/ros/kinetic/lib/python2.7/dist-packages/genjava/genjava_main.py", line 45, in <module>
import rosjava_build_tools
File "/opt/ros/kinetic/lib/python2.7/dist-packages/rosjava_build_tools/__init__.py", line 7, in <module>
import console
ImportError: No module named 'console'
arbotix_ros/arbotix_msgs/CMakeFiles/arbotix_msgs_generate_messages_java_gradle.dir/build.make:77: recipe for target 'arbotix_ros/arbotix_msgs/java/arbotix_msgs/build.gradle' failed
make[2]: *** [arbotix_ros/arbotix_msgs/java/arbotix_msgs/build.gradle] Error 1
CMakeFiles/Makefile2:931: recipe for target
'arbotix_ros/arbotix_msgs/CMakeFiles/arbotix_msgs_generate_messages_java_gradle.dir/all' failed
make[1]: *** [arbotix_ros/arbotix_msgs/CMakeFiles/arbotix_msgs_generate_messages_java_gradle.dir/all]
Error 2
Makefile:138: recipe for target 'all' failed
make: *** [all] Error 2
Invoking "make -j1 -l1" failed
有人知道怎么解决吗?如果是这样,我将非常感谢您的帮助。
提前谢谢你,
乔恩。
【问题讨论】:
【参考方案1】:这似乎是一个依赖问题。ImportError: No module named 'console'
行表示console
python 包丢失。
使用 pip 安装 console。
【讨论】:
【参考方案2】:感谢您的回答 Shrijit Singh。我尝试使用 pip 进行控制台安装,但似乎安装不正常:
~/catkin_ws$ pip install console
/home/jon/.local/lib/python2.7/site-packages/pip/_vendor/requests/__init__.py:83: RequestsDependencyWarning: Old version of cryptography ([1, 2, 3]) may cause slowdown.
warnings.warn(warning, RequestsDependencyWarning)
DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. A future version of pip will drop support for Python 2.7. More details about Python 2 support in pip, can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support
Defaulting to user installation because normal site-packages is not writeable
Collecting console
Using cached console-0.990-py2.py3-none-any.whl (74 kB)
ERROR: Package 'console' requires a different Python: 2.7.12 not in '>=3.4'
然后我尝试安装 pytest 4.6,因为它是支持 Python 2.7 和 3.4 的最后一个系列。但是得到了同样的错误。
【讨论】:
以上是关于执行 catkin_make 时出错:调用“make -j1 -l1”失败的主要内容,如果未能解决你的问题,请参考以下文章
运行 catkin_make 时调用“make -j4 -l4”失败错误