Ubuntu 18.04 中的 Boost(C++ Libs)安装

Ubuntu 18.04 中的 Boost(C++ Libs)安装

在干净的 Ubuntu 18.4 上安装 Boost 时出现错误。

sudo apt install libboost-all-dev

给出输出:

Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following additional packages will be installed:
  dh-python gir1.2-harfbuzz-0.0 ibverbs-providers icu-devtools libboost-atomic-dev libboost-atomic1.65-dev libboost-atomic1.65.1 libboost-chrono-dev
  libboost-chrono1.65-dev libboost-chrono1.65.1 libboost-container-dev libboost-container1.65-dev libboost-container1.65.1 libboost-context-dev
  libboost-context1.65-dev libboost-context1.65.1 libboost-coroutine-dev libboost-coroutine1.65-dev libboost-coroutine1.65.1 libboost-date-time-dev
  libboost-date-time1.65-dev libboost-dev libboost-exception-dev libboost-exception1.65-dev libboost-fiber-dev libboost-fiber1.65-dev
  libboost-fiber1.65.1 libboost-filesystem-dev libboost-filesystem1.65-dev libboost-graph-dev libboost-graph-parallel-dev
  libboost-graph-parallel1.65-dev libboost-graph-parallel1.65.1 libboost-graph1.65-dev libboost-graph1.65.1 libboost-iostreams-dev
  libboost-iostreams1.65-dev libboost-locale-dev libboost-locale1.65-dev libboost-log-dev libboost-log1.65-dev libboost-log1.65.1 libboost-math-dev
  libboost-math1.65-dev libboost-math1.65.1 libboost-mpi-dev libboost-mpi-python-dev libboost-mpi-python1.65-dev libboost-mpi-python1.65.1
  libboost-mpi1.65-dev libboost-mpi1.65.1 libboost-numpy-dev libboost-numpy1.65-dev libboost-numpy1.65.1 libboost-program-options-dev
  libboost-program-options1.65-dev libboost-python-dev libboost-python1.65-dev libboost-python1.65.1 libboost-random-dev libboost-random1.65-dev
  libboost-random1.65.1 libboost-regex-dev libboost-regex1.65-dev libboost-regex1.65.1 libboost-serialization-dev libboost-serialization1.65-dev
  libboost-serialization1.65.1 libboost-signals-dev libboost-signals1.65-dev libboost-signals1.65.1 libboost-stacktrace-dev libboost-stacktrace1.65-dev
  libboost-stacktrace1.65.1 libboost-system-dev libboost-system1.65-dev libboost-test-dev libboost-test1.65-dev libboost-test1.65.1 libboost-thread-dev
  libboost-thread1.65-dev libboost-timer-dev libboost-timer1.65-dev libboost-timer1.65.1 libboost-tools-dev libboost-type-erasure-dev
  libboost-type-erasure1.65-dev libboost-type-erasure1.65.1 libboost-wave-dev libboost-wave1.65-dev libboost-wave1.65.1 libboost1.65-dev
  libboost1.65-tools-dev libfabric1 libglib2.0-dev libglib2.0-dev-bin libgraphite2-dev libharfbuzz-dev libharfbuzz-gobject0 libhwloc-dev
  libhwloc-plugins libhwloc5 libibverbs-dev libibverbs1 libicu-dev libicu-le-hb-dev libicu-le-hb0 libiculx60 libnl-route-3-200 libnuma-dev
  libopenmpi-dev libopenmpi2 libpcre16-3 libpcre3-dev libpcre32-3 libpsm-infinipath1 libpython3-dev libpython3.6-dev librdmacm1 mpi-default-bin
  mpi-default-dev ocl-icd-libopencl1 openmpi-bin openmpi-common python3-dev python3-distutils python3-lib2to3 python3.6-dev
Suggested packages:
  libboost-doc graphviz libboost1.65-doc gccxml libmpfrc++-dev libntl-dev xsltproc docbook-xml docbook-xsl default-jdk fop libglib2.0-doc
  libgraphite2-utils libhwloc-contrib-plugins icu-doc openmpi-doc opencl-icd gfortran
The following NEW packages will be installed:
  dh-python gir1.2-harfbuzz-0.0 ibverbs-providers icu-devtools libboost-all-dev libboost-atomic-dev libboost-atomic1.65-dev libboost-atomic1.65.1
  libboost-chrono-dev libboost-chrono1.65-dev libboost-chrono1.65.1 libboost-container-dev libboost-container1.65-dev libboost-container1.65.1
  libboost-context-dev libboost-context1.65-dev libboost-context1.65.1 libboost-coroutine-dev libboost-coroutine1.65-dev libboost-coroutine1.65.1
  libboost-date-time-dev libboost-date-time1.65-dev libboost-dev libboost-exception-dev libboost-exception1.65-dev libboost-fiber-dev
  libboost-fiber1.65-dev libboost-fiber1.65.1 libboost-filesystem-dev libboost-filesystem1.65-dev libboost-graph-dev libboost-graph-parallel-dev
  libboost-graph-parallel1.65-dev libboost-graph-parallel1.65.1 libboost-graph1.65-dev libboost-graph1.65.1 libboost-iostreams-dev
  libboost-iostreams1.65-dev libboost-locale-dev libboost-locale1.65-dev libboost-log-dev libboost-log1.65-dev libboost-log1.65.1 libboost-math-dev
  libboost-math1.65-dev libboost-math1.65.1 libboost-mpi-dev libboost-mpi-python-dev libboost-mpi-python1.65-dev libboost-mpi-python1.65.1
  libboost-mpi1.65-dev libboost-mpi1.65.1 libboost-numpy-dev libboost-numpy1.65-dev libboost-numpy1.65.1 libboost-program-options-dev
  libboost-program-options1.65-dev libboost-python-dev libboost-python1.65-dev libboost-python1.65.1 libboost-random-dev libboost-random1.65-dev
  libboost-random1.65.1 libboost-regex-dev libboost-regex1.65-dev libboost-regex1.65.1 libboost-serialization-dev libboost-serialization1.65-dev
  libboost-serialization1.65.1 libboost-signals-dev libboost-signals1.65-dev libboost-signals1.65.1 libboost-stacktrace-dev libboost-stacktrace1.65-dev
  libboost-stacktrace1.65.1 libboost-system-dev libboost-system1.65-dev libboost-test-dev libboost-test1.65-dev libboost-test1.65.1 libboost-thread-dev
  libboost-thread1.65-dev libboost-timer-dev libboost-timer1.65-dev libboost-timer1.65.1 libboost-tools-dev libboost-type-erasure-dev
  libboost-type-erasure1.65-dev libboost-type-erasure1.65.1 libboost-wave-dev libboost-wave1.65-dev libboost-wave1.65.1 libboost1.65-dev
  libboost1.65-tools-dev libfabric1 libglib2.0-dev libglib2.0-dev-bin libgraphite2-dev libharfbuzz-dev libharfbuzz-gobject0 libhwloc-dev
  libhwloc-plugins libhwloc5 libibverbs-dev libibverbs1 libicu-dev libicu-le-hb-dev libicu-le-hb0 libiculx60 libnl-route-3-200 libnuma-dev
  libopenmpi-dev libopenmpi2 libpcre16-3 libpcre3-dev libpcre32-3 libpsm-infinipath1 libpython3-dev libpython3.6-dev librdmacm1 mpi-default-bin
  mpi-default-dev ocl-icd-libopencl1 openmpi-bin openmpi-common python3-dev python3-distutils python3-lib2to3 python3.6-dev
0 upgraded, 129 newly installed, 0 to remove and 5 not upgraded.
Need to get 7,218 kB/76.3 MB of archives.
After this operation, 336 MB of additional disk space will be used.
Do you want to continue? [Y/n] 
Err:1 http://us.archive.ubuntu.com/ubuntu bionic/main amd64 libboost1.65-dev amd64 1.65.1+dfsg-0ubuntu5                                                  
  Connection failed [IP: 91.189.91.26 80]
E: Failed to fetch http://us.archive.ubuntu.com/ubuntu/pool/main/b/boost1.65.1/libboost1.65-dev_1.65.1+dfsg-0ubuntu5_amd64.deb  Connection failed [IP: 91.189.91.26 80]
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?

浏览它提到的路径(http://us.archive.ubuntu.com/ubuntu/pool/main/b/boost1.65.1/),没有amd64版本可供下载。

不确定这里发生了什么,也许是存储库和包管理器不同步?无论如何,是否有我可以应用的本地解决方法或任何方法可以标记此问题以便在其他地方修复?

相关内容