即使执行 sudo apt-get update 后也无法在 Ubuntu 17.04 上安装 vim 编辑器

即使执行 sudo apt-get update 后也无法在 Ubuntu 17.04 上安装 vim 编辑器

我的 sources.list 文件如下:

deb cdrom:[Ubuntu 17.04 _Zesty Zapus_ - Release amd64 (20170412)]/ zesty main restricted 
deb http://in.archive.ubuntu.com/ubuntu/ zesty universe
deb-src http://in.archive.ubuntu.com/ubuntu/ zesty universe
deb http://in.archive.ubuntu.com/ubuntu/ zesty-updates universe
deb-src http://in.archive.ubuntu.com/ubuntu/ zesty-updates universe

deb http://in.archive.ubuntu.com/ubuntu/ zesty multiverse
deb-src http://in.archive.ubuntu.com/ubuntu/ zesty multiverse
deb http://in.archive.ubuntu.com/ubuntu/ zesty-updates multiverse
deb-src http://in.archive.ubuntu.com/ubuntu/ zesty-updates multiverse

deb http://in.archive.ubuntu.com/ubuntu/ zesty-backports main restricted universe multiverse
deb-src http://in.archive.ubuntu.com/ubuntu/ zesty-backports main restricted universe multiverse

deb http://archive.canonical.com/ubuntu zesty partner
deb-src http://archive.canonical.com/ubuntu zesty partner

deb http://security.ubuntu.com/ubuntu zesty-security main restricted
deb-src http://security.ubuntu.com/ubuntu zesty-security main restricted
deb http://security.ubuntu.com/ubuntu zesty-security universe
deb-src http://security.ubuntu.com/ubuntu zesty-security universe
deb http://security.ubuntu.com/ubuntu zesty-security multiverse
deb-src http://security.ubuntu.com/ubuntu zesty-security multiverse

执行 sudo-get update 后,我最终得到以下结果:

E: The repository 'http://security.ubuntu.com/ubuntu zesty-security            Release' does no longer have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.

执行 sudo apt-get install vim 后我得到以下结果:

Reading package lists... Done
Building dependency tree       
Reading state information... Done
Package vim 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 'vim' has no installation candidate

W: The repository 'http://in.archive.ubuntu.com/ubuntu zesty Release' does not have a Release file.
N: Data from such a repository can't be authenticated and is therefore potentially dangerous to use.
N: See apt-secure(8) manpage for repository creation and user configuration details.
W: The repository 'http://in.archive.ubuntu.com/ubuntu zesty-updates Release' does not have a Release file.
N: Data from such a repository can't be authenticated and is therefore potentially dangerous to use.
N: See apt-secure(8) manpage for repository creation and user configuration details.
W: The repository 'http://in.archive.ubuntu.com/ubuntu zesty-backports Release' does not have a Release file.
N: Data from such a repository can't be authenticated and is therefore potentially dangerous to use.
N: See apt-secure(8) manpage for repository creation and user configuration details.

答案1

您的问题是 17.04 已过期...因此您需要将存储库更改为旧版本。请备份您的 sources.list 并将内容替换为

## EOL upgrade sources.list
# Required
deb http://old-releases.ubuntu.com/ubuntu/ zesty main restricted universe multiverse
deb http://old-releases.ubuntu.com/ubuntu/ zesty-updates main restricted universe multiverse
deb http://old-releases.ubuntu.com/ubuntu/ zesty-security main restricted universe multiverse

sudo apt-get update然后尝试sudo apt-get upgrade。现在你应该可以安装 vim 了。我没有尝试。在以下位置找到解决方案:https://ubuntuforums.org/showthread.php?t=2382832

相关内容