2

参考此链接,我正在将 ROS2 Eloquent 安装到我的 Ubuntu 18.04.4 LTS 中。

我的系统信息如下(通过uname -a

Linux myname 5.3.0-28-generic #30~18.04.1-Ubuntu SMP Fri Jan 17 06:14:09 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux

我可以毫无问题地设置语言环境设置源。然后,安装 ROS 2 软件包

运行sudo apt update后,我运行sudo apt install ros-eloquent-desktop并返回:

  The following packages will be upgraded:
    cpp-7 g++-7 gcc-7 gcc-7-base libasan4 libcilkrts5 libdrm-amdgpu1
  libdrm-common libdrm-intel1 libdrm-nouveau2 libdrm-radeon1 libdrm2 libexif12
  libgcc-7-dev libglib2.0-0 libglib2.0-bin libicu60 libjpeg-turbo8 libjson-c3
  libopenexr22 libpython2.7 libpython2.7-minimal libpython2.7-stdlib
  libpython3.6 libpython3.6-minimal libpython3.6-stdlib libsqlite3-0 libssl1.1
  libstdc++-7-dev libubsan0 libuuid1 libwayland-client0 libwayland-cursor0
  libwayland-egl1 libwayland-server0 libxml2 python3.6 python3.6-minimal
38 upgraded, 881 newly installed, 0 to remove and 196 not upgraded.
    Need to get 9,381 kB/432 MB of archives.
    After this operation, 1,967 MB of additional disk space will be used.
    Do you want to continue? [Y/n] y
    Ign:1 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 gcc-7 amd64 7.5.0-3ubuntu1~18.04
    Err:1 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 gcc-7 amd64 7.5.0-3ubuntu1~18.04
      Connection failed [IP: 91.189.88.152 80]
    E: Failed to fetch http://archive.ubuntu.com/ubuntu/pool/main/g/gcc-7/gcc-7_7.5.0-3ubuntu1~18.04_amd64.deb  Connection failed [IP: 91.189.88.152 80]
    E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?

我截断了回复,只保留最后一部分,我认为这将帮助您了解问题所在。我用谷歌搜索但找不到解决方案。我也没有安装任何防火墙和防病毒软件。

请帮忙。非常感谢。

4

1 回答 1

1

我实际上已经解决了我的问题,但我认为你的方式更合适。如果我以后遇到类似的问题,它可以作为我的补救措施。无论如何,我所做的是:

我最终直接从http://security.ubuntu.com/ubuntu/pool/main/g/gcc-7/gcc-7_7.5.0-3ubuntu1~18.04_amd64.deb下载了 deb 包,然后通过命令安装它(参考:https ://unix.stackexchange.com/questions/159094/how-to-install-a-deb-file-by-dpkg-i-or-by-apt )

sudo dpkg -i path_to_the_deb
sudo apt --fix-broken install
sudo apt update

然后,我能够安装 ros-eloquent-desktop。

于 2020-06-16T02:18:41.317 回答