ros2 源码安装3.1——iceoryx_posh包报错

文章描述了一种在构建ROS2的iceoryx_posh组件时遇到的错误,由于网络问题无法从github克隆子模块。解决方案是修改.submodules文件,添加代理设置以访问github。通过这样做,作者成功地完成了构建过程。报错的根本原因是国内网络访问GitHub的不稳定或限制。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

一、报错内容

--- stderr: iceoryx_posh                                                                                                             
Cloning into 'src'...
Note: switching to 'v0.1.1'.

You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by switching back to a branch.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:

  git switch -c <new-branch-name>

Or undo this operation with:

  git switch -

Turn off this advice by setting config variable advice.detachedHead to false

HEAD is now at fededad one-char typo
Submodule 'deps/meta-cmake' (https://github.com/meta-toolkit/meta-cmake.git) registered for path 'deps/meta-cmake'
Cloning into '/home/EPRobot/ros2_galactic/build/iceoryx_posh/dependencies/cpptoml/src/deps/meta-cmake'...
fatal: unable to access 'https://github.com/meta-toolkit/meta-cmake.git/': Failed to connect to github.com port 443: Connection timed out
fatal: clone of 'https://github.com/meta-toolkit/meta-cmake.git' into submodule path '/home/EPRobot/ros2_galactic/build/iceoryx_posh/dependencies/cpptoml/src/deps/meta-cmake' failed

Failed to clone 'deps/meta-cmake'. Retry scheduled
Cloning into '/home/EPRobot/ros2_galactic/build/iceoryx_posh/dependencies/cpptoml/src/deps/meta-cmake'...
fatal: unable to access 'https://github.com/meta-toolkit/meta-cmake.git/': GnuTLS recv error (-110): The TLS connection was non-properly terminated.
fatal: clone of 'https://github.com/meta-toolkit/meta-cmake.git' into submodule path '/home/EPRobot/ros2_galactic/build/iceoryx_posh/dependencies/cpptoml/src/deps/meta-cmake' failed
Failed to clone 'deps/meta-cmake' a second time, aborting
CMake Error at download/ext_cpptoml-prefix/tmp/ext_cpptoml-gitclone.cmake:52 (message):
  Failed to update submodules in:
  '/home/EPRobot/ros2_galactic/build/iceoryx_posh/dependencies/cpptoml/src'


make[2]: *** [CMakeFiles/ext_cpptoml.dir/build.make:92: ext_cpptoml-prefix/src/ext_cpptoml-stamp/ext_cpptoml-download] Error 1
make[1]: *** [CMakeFiles/Makefile2:76: CMakeFiles/ext_cpptoml.dir/all] Error 2
make: *** [Makefile:84: all] Error 2
CMake Error at cmake/cpptoml/CMakeLists.txt:56 (message):
  Build step [download] for cpptoml failed: 2


---
Failed   <<< iceoryx_posh [4min 21s, exited with code 1]
Aborted  <<< foonathan_memory_vendor [6min 30s]                                                           
Aborted  <<< yaml_cpp_vendor [6min 12s]                                                                    
Aborted  <<< google_benchmark_vendor [6min 45s]                                             
                                          
Summary: 68 packages finished [11min 26s]
  1 package failed: iceoryx_posh
  3 packages aborted: foonathan_memory_vendor google_benchmark_vendor yaml_cpp_vendor
  4 packages had stderr output: foonathan_memory_vendor google_benchmark_vendor iceoryx_posh rti_connext_dds_cmake_module

二、解决办法

找到文件:/home/EPRobot/ros2_galactic/build/iceoryx_posh/dependencies/cpptoml/src/.gitmodules

        (EPRobot是用户名,根据自己设置情况需要修改)

修改加入代理:

        加入 https://phroxy.com/

三、结果

build成功

四、报错原因

国内的网络访问github,网络不通畅。

五、参考的内容

GitHub Proxy 代理加速

GitHub - ros2/rmw_iceoryx: rmw implementation for iceoryx

评论 8
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值