Skip to main content
 首页 » 编程设计

python之OSX Mojave 上的 ROS Kinetic 安装错误

2024年12月31日8mfrbuaa

在我的 mac 上安装 ROS kinetic 的过程中。我一直在尝试使用以下命令解决依赖关系:

$ cd ~/ros_catkin_ws 
$ rosinstall_generator ros_comm --rosdistro kinetic --deps --wet-only --tar > kinetic-ros_comm-wet.rosinstall 
$ wstool init -j8 src kinetic-ros_comm-wet.rosinstall 
 
$ rosdep install --from-paths src --ignore-src --rosdistro kinetic -y # resolves dependancies 

我收到以下错误:

Error: No available formula with the name "gtest"  
 
ERROR: Rosdep experienced an internal error. 
Please go to the rosdep page [1] and file a bug report with the message below. 
[1] : http://www.ros.org/wiki/rosdep 
 
rosdep version: 0.13.0 
 
Bad installer [homebrew]: Error while parsing brew info for 'gtest' 
 * Output of `brew info gtest --json=v1`: 
 
 * Error while parsing: 
 Traceback (most recent call last): 
  File "/usr/local/lib/python2.7/site-packages/rosdep2/platforms/osx.py", line 203, in is_installed 
    pkg_info = json.loads(std_out) 
  File "/usr/local/Cellar/python@2/2.7.15_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/__init__.py", line 339, in loads 
    return _default_decoder.decode(s) 
  File "/usr/local/Cellar/python@2/2.7.15_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/decoder.py", line 364, in decode 
    obj, end = self.raw_decode(s, idx=_w(s, 0).end()) 
  File "/usr/local/Cellar/python@2/2.7.15_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/decoder.py", line 382, in raw_decode 
    raise ValueError("No JSON object could be decoded") 
ValueError: No JSON object could be decoded 

我已经尝试卸载并重新安装一些东西,但我不确定实际问题是什么以及如何解决这个问题。

请您参考如下方法:

同样在 guide 中指定,Google Mock 与 OS X 不兼容,因此您应该跳过它,将 --skip-keys google-mock 添加到 rosdep install