如何安装软件中心?

如何安装软件中心?

我搜索并运行了以下命令。

sudo apt-get update; sudo apt-get --purge --reinstall install software-center software-properties-common software-properties-gtk

但我仍然没有软件中心。我收到此错误...

Reading package lists... Done
E: Failed to fetch "//mirrors.sonic.net/ubuntu/dists/zesty-updates/universe/source/Sources"  404  Not Found
E: Failed to fetch "//mirrors.sonic.net/ubuntu/dists/zesty-backports/main/source/Sources"  404  Not Found
E: Failed to fetch "//mirrors.sonic.net/ubuntu/dists/zesty-security/restricted/source/Sources"  404  Not Found
E: Some index files failed to download. They have been ignored, or old ones used instead.
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Package software-center 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 'software-center' has no installation candidate

答案1

看来您使用的存储库已关闭所有三个存储库。我检查了它们的 ftp 服务器,发现这三个根本不存在。

mirrors.sonic.net/ubuntu/dists/zesty-updates/universe/source/Sources
mirrors.sonic.net/ubuntu/dists/zesty-backports/main/source/Sources
mirrors.sonic.net/ubuntu/dists/zesty-security/restricted/source/Sources

因此,当您尝试连接到这些存储库时,您将收到 404 Not Found 错误。

建议您在中选择 Ubuntu或Ubuntu Settings --> Software and Updates --> Ubuntu Software下更改您的存储库。Download from:Main ServerServer from your country

图片

或者,你可以打开一个新终端,输入 root 并输入sudo nano /etc/apt/sources.list。你会看到类似这样的内容:

# sources.list
# deb cdrom:[Ubuntu 17.04 _zesty zapus_ - Release i386 (201xxxxx.x)]/ zesty main restricted
# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.
deb http://mirrors.sonic.net/ubuntu/ zesty main restricted
deb-src http://mirrors.sonic.net/ubuntu/ zesty main restricted
#...

全部mirrors.sonic.net改成archive.ubuntu.com

完成这些之后,运行sudo apt-get update; sudo apt-get install gnome-software,现在就可以正常工作了。

(更新:不再使用 Zesty software-center,请改用gnome-softwareubuntu-software。)

如果您知道要安装的其他软件包,则可以使用 Synaptic 包管理器或直接使用apt-get来安装您想要的软件包。

相关内容