小鱼 ROS 2 新书上线!点击链接查看, 新书配套视频点击链接查看。
提问前必看的发帖注意事项—— 提问前必看!不符合要求的问题拒绝回答!!
社区使用指南—如何添加标签修改密码
运行roscore命令报错
-
运行roscore命令报错如下:
Traceback (most recent call last):
File "/opt/ros/noetic/lib/python3/dist-packages/roslaunch/init.py", line 347, in main
p.start()
File "/opt/ros/noetic/lib/python3/dist-packages/roslaunch/parent.py", line 316, in start
self.runner.launch()
File "/opt/ros/noetic/lib/python3/dist-packages/roslaunch/launch.py", line 676, in launch
self._setup()
File "/opt/ros/noetic/lib/python3/dist-packages/roslaunch/launch.py", line 651, in _setup
launched = self._launch_master()
File "/opt/ros/noetic/lib/python3/dist-packages/roslaunch/launch.py", line 413, in _launch_master
validate_master_launch(m, self.is_core, self.is_rostest)
File "/opt/ros/noetic/lib/python3/dist-packages/roslaunch/launch.py", line 83, in validate_master_launch
if not rosgraph.network.is_local_address(m.get_host()):
File "/opt/ros/noetic/lib/python3/dist-packages/rosgraph/network.py", line 170, in is_local_address
local_addresses = ['localhost'] + get_local_addresses()
File "/opt/ros/noetic/lib/python3/dist-packages/rosgraph/network.py", line 212, in get_local_addresses
import netifaces
ModuleNotFoundError: No module named 'netifaces'
然后我又使用pip install netifaces,系统提示Requirement already satisfied: netifaces in /usr/lib/python3/dist-packages (0.10.4)
请问接下来怎么办? -
问题已解决,通过重新安装netifaces即可
pip uninstall netifaces
pip install netifaces