当我尝试在 Ubuntu 软件中心安装 7zip 时,它报告说可以从 Universe 存储库获取。我点击“使用此源”,进行身份验证,但什么也没发生。
尽管我的互联网连接良好,但我尝试安装的所有东西都是这种情况。
当我运行该命令时,sudo apt-get update
我得到以下结果:
Ign private-ppa.launchpad.net saucy InRelease
Err archive.ubuntu.com saucy InRelease
Err archive.ubuntu.com saucy Release.gpg Could not resolve 'hostname'
更新:[回复评论]
quinco@quinco-Compaq-Linux:~$ cat /etc/apt/sources.list
deb cdrom:[Ubuntu 13.04 _Raring Ringtail_ - Release i386 (20130424)]/ raring main restricted
deb cdrom:[Ubuntu 13.04 _Raring Ringtail_ - Release i386 (20130424)]/ raring main restricted
# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.
deb http://au.archive.ubuntu.com/ubuntu/ saucy main restricted
deb-src http://au.archive.ubuntu.com/ubuntu/ saucy main restricted
## Major bug fix updates produced after the final release of the
## distribution.
deb http://au.archive.ubuntu.com/ubuntu/ saucy-updates main restricted
deb-src http://au.archive.ubuntu.com/ubuntu/ saucy-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://au.archive.ubuntu.com/ubuntu/ saucy universe
deb-src http://au.archive.ubuntu.com/ubuntu/ saucy universe
deb http://au.archive.ubuntu.com/ubuntu/ saucy-updates universe
deb-src http://au.archive.ubuntu.com/ubuntu/ saucy-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://au.archive.ubuntu.com/ubuntu/ saucy multiverse
deb-src http://au.archive.ubuntu.com/ubuntu/ saucy multiverse
deb http://au.archive.ubuntu.com/ubuntu/ saucy-updates multiverse
deb-src http://au.archive.ubuntu.com/ubuntu/ saucy-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 http://au.archive.ubuntu.com/ubuntu/ saucy-backports main restricted universe multiverse
deb-src http://au.archive.ubuntu.com/ubuntu/ saucy-backports main restricted universe multiverse
deb http://au.archive.ubuntu.com/ubuntu/ saucy-security main restricted
deb-src http://au.archive.ubuntu.com/ubuntu/ saucy-security main restricted
deb http://au.archive.ubuntu.com/ubuntu/ saucy-security universe
deb-src http://au.archive.ubuntu.com/ubuntu/ saucy-security universe
deb http://au.archive.ubuntu.com/ubuntu/ saucy-security multiverse
deb-src http://au.archive.ubuntu.com/ubuntu/ saucy-security 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.canonical.com/ubuntu saucy partner
# deb-src http://archive.canonical.com/ubuntu raring partner
## This software is not part of Ubuntu, but is offered by third-party
## developers who want to ship their latest software.
deb http://extras.ubuntu.com/ubuntu saucy main
deb-src http://extras.ubuntu.com/ubuntu saucy main
# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.
## Major bug fix updates produced after the final release of the
## distribution.
## 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.
## 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.
## 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.
## 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.canonical.com/ubuntu saucy partner
# deb-src http://archive.canonical.com/ubuntu raring partner
## This software is not part of Ubuntu, but is offered by third-party
## developers who want to ship their latest software.
deb http://archive.ubuntu.com/ubuntu saucy main universe restricted multiverse
# deb-src http://archive.ubuntu.com/ubuntu saucy main universe restricted multiverse
# deb-src http://archive.ubuntu.com/ubuntu saucy universe
deb http://au.archive.ubuntu.com/ubuntu/ saucy-proposed multiverse main restricted universe
另一个更新:
quinco@quinco-Compaq-Linux:~$ cmake --version
The program 'cmake' is currently not installed. You can install it by typing:
sudo apt-get install cmake
quinco@quinco-Compaq-Linux:~$ sudo apt-get install cmake
[sudo] password for quinco:
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package cmake 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
E: Package 'cmake' has no installation candidate
答案1
运行以下命令来安装 7Zip:
sudo apt-get install p7zip-full p7zip-rar
答案2
为了将来参考,您应该学习使用 apt-cache search 来查找安装候选程序。例如,“apt-cache search 7zip”将返回您的系统知道引用此实用程序的软件包列表。