![libboost-all-dev 和 python-* 等软件包无法找到软件包,并且 ```sudo apt update``` 不起作用](https://linux22.com/image/912100/libboost-all-dev%20%E5%92%8C%20python-*%20%E7%AD%89%E8%BD%AF%E4%BB%B6%E5%8C%85%E6%97%A0%E6%B3%95%E6%89%BE%E5%88%B0%E8%BD%AF%E4%BB%B6%E5%8C%85%EF%BC%8C%E5%B9%B6%E4%B8%94%20%60%60%60sudo%20apt%20update%60%60%60%20%E4%B8%8D%E8%B5%B7%E4%BD%9C%E7%94%A8.png)
我已经安装libboost-all-dev python-mako python-docutils python-numpy在 buntu 16.04.6 LTS 上,但总是返回无法定位。
我试过了sudo aptitude install
,还是不行。我也试过了sudo add-apt-repository universe
,还是找不到包。
我曾尝试重新生成 /etc/apt/sources.list 并执行 sudo apt-get update,但仍然不起作用。
$ sudo apt-get install libboost-all-dev python-mako python-docutils python-numpy
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package python-numpy is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
Package python-docutils is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
However the following packages replace it:
docutils-common
E: Unable to locate package libboost-all-dev
E: Unable to locate package python-mako
E: Package 'python-docutils' has no installation candidate
E: Package 'python-numpy' has no installation candidate
$ cat /etc/apt/sources.list
# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.
deb http://archive.ubuntu.com/ubuntu xenial main restricted
deb-src http://archive.ubuntu.com/ubuntu xenial multiverse main universe restricted #Added by software-properties
# deb-src http://cn.archive.ubuntu.com/ubuntu/ xenial main restricted
## Major bug fix updates produced after the final release of the
## distribution.
# deb-src http://cn.archive.ubuntu.com/ubuntu/ xenial-updates main restricted
## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team. Also, please note that software in universe WILL NOT receive any
## review or updates from the Ubuntu security team.
deb http://archive.ubuntu.com/ubuntu xenial universe
# deb-src http://cn.archive.ubuntu.com/ubuntu/ xenial universe
# deb-src http://cn.archive.ubuntu.com/ubuntu/ xenial-updates universe
## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team, and may not be under a free licence. Please satisfy yourself as to
## your rights to use the software. Also, please note that software in
## multiverse WILL NOT receive any review or updates from the Ubuntu
## security team.
deb http://archive.ubuntu.com/ubuntu xenial multiverse
# deb-src http://cn.archive.ubuntu.com/ubuntu/ xenial multiverse
# deb-src http://cn.archive.ubuntu.com/ubuntu/ xenial-updates multiverse
## N.B. software from this repository may not have been tested as
## extensively as that contained in the main release, although it includes
## newer versions of some applications which may provide useful features.
## Also, please note that software in backports WILL NOT receive any review
## or updates from the Ubuntu security team.
# deb-src http://cn.archive.ubuntu.com/ubuntu/ xenial-backports main restricted universe multiverse
## This software is not part of Ubuntu, but is offered by Canonical and the
## respective vendors as a service to Ubuntu users.
deb http://archive.canonical.com/ubuntu xenial partner
deb-src http://archive.canonical.com/ubuntu xenial partner
deb http://archive.ubuntu.com/ubuntu xenial-security main restricted
deb-src http://archive.ubuntu.com/ubuntu xenial-security multiverse main universe restricted #Added by software-properties
# deb-src http://security.ubuntu.com/ubuntu xenial-security main restricted
deb http://archive.ubuntu.com/ubuntu xenial-security universe
# deb-src http://security.ubuntu.com/ubuntu xenial-security universe
deb http://archive.ubuntu.com/ubuntu xenial-security multiverse
# deb-src http://security.ubuntu.com/ubuntu xenial-security multiverse
deb http://archive.ubuntu.com/ubuntu xenial-updates multiverse universe main restricted
deb-src http://archive.ubuntu.com/ubuntu xenial-updates multiverse universe main restricted #Added by software-properties
新的 sources.list 文件仅包含标准源,
$ cat /etc/apt/sources.list
# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.
# deb http://archive.ubuntu.com/ubuntu xenial main restricted
# deb-src http://archive.ubuntu.com/ubuntu xenial multiverse main universe restricted #Added by software-properties
# deb-src http://cn.archive.ubuntu.com/ubuntu/ xenial main restricted
## Major bug fix updates produced after the final release of the
## distribution.
# deb-src http://cn.archive.ubuntu.com/ubuntu/ xenial-updates main restricted
## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team. Also, please note that software in universe WILL NOT receive any
## review or updates from the Ubuntu security team.
# deb-src http://cn.archive.ubuntu.com/ubuntu/ xenial universe
# deb-src http://cn.archive.ubuntu.com/ubuntu/ xenial-updates universe
## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team, and may not be under a free licence. Please satisfy yourself as to
## your rights to use the software. Also, please note that software in
## multiverse WILL NOT receive any review or updates from the Ubuntu
## security team.
# deb http://archive.ubuntu.com/ubuntu xenial multiverse
# deb-src http://cn.archive.ubuntu.com/ubuntu/ xenial multiverse
# deb-src http://cn.archive.ubuntu.com/ubuntu/ xenial-updates multiverse
## N.B. software from this repository may not have been tested as
## extensively as that contained in the main release, although it includes
## newer versions of some applications which may provide useful features.
## Also, please note that software in backports WILL NOT receive any review
## or updates from the Ubuntu security team.
# deb-src http://cn.archive.ubuntu.com/ubuntu/ xenial-backports main restricted universe multiverse
## Uncomment the following two lines to add software from Canonical's
## 'partner' repository.
## This software is not part of Ubuntu, but is offered by Canonical and the
## respective vendors as a service to Ubuntu users.
# deb http://archive.ubuntu.com/ubuntu xenial-security main restricted
# deb-src http://archive.ubuntu.com/ubuntu xenial-security multiverse main universe restricted #Added by software-properties
# deb-src http://security.ubuntu.com/ubuntu xenial-security main restricted
# deb-src http://security.ubuntu.com/ubuntu xenial-security universe
# deb http://archive.ubuntu.com/ubuntu xenial-security multiverse
# deb-src http://security.ubuntu.com/ubuntu xenial-security multiverse
deb http://archive.ubuntu.com/ubuntu/ xenial main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ xenial-updates main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ xenial-backports main restricted universe multiverse
deb http://security.ubuntu.com/ubuntu xenial-security main restricted universe multiverse
deb http://archive.canonical.com/ubuntu xenial partner
# deb-src http://archive.ubuntu.com/ubuntu xenial-updates multiverse universe main restricted #Added by software-properties
答案1
由于命令失败sudo apt update
,无法找到库,这是我之前安装 JetPack 时造成的。
运行命令时sudo apt update
,输出:
Failed to fetch http://security.ubuntu.com/ubuntu/dists/xenial-security/main/binary-arm64/Packages 404 Not Found [IP: 91.189.91.23 80]
我修复了它
sudo apt-get purge ".*:arm64"
dpkg --remove-architecture arm64
然后通过 更新源后sudo apt update
,一切都已修复。