尝试在我的 Ubuntu 17.04 中安装 Python 2.7 后:
$ sudo apt-get install software-properties-common
$ sudo add-apt-repository ppa:fkrull/deadsnakes
每当我运行更新时,我就开始出现错误:
$ sudo apt-get update
sudo apt-get update
Get:1 http://security.ubuntu.com/ubuntu zesty-security InRelease [89.2 kB]
Ign:2 http://ppa.launchpad.net/fkrull/deadsnakes/ubuntu zesty InRelease
Ign:3 http://ppa.launchpad.net/fkrull/deadsnakes/ubuntu zesty Release
Hit:4 http://mirrors.linode.com/ubuntu zesty InRelease
Hit:5 http://mirrors.linode.com/ubuntu zesty-updates InRelease
Hit:6 http://mirrors.linode.com/ubuntu zesty-backports InRelease
Ign:7 http://ppa.launchpad.net/fkrull/deadsnakes/ubuntu zesty/main all Packages
Ign:8 http://ppa.launchpad.net/fkrull/deadsnakes/ubuntu zesty/main amd64 Packages
Ign:9 http://ppa.launchpad.net/fkrull/deadsnakes/ubuntu zesty/main i386 Packages
Ign:10 http://ppa.launchpad.net/fkrull/deadsnakes/ubuntu zesty/main Translation-en_US
Ign:11 http://ppa.launchpad.net/fkrull/deadsnakes/ubuntu zesty/main Translation-en
Ign:7 http://ppa.launchpad.net/fkrull/deadsnakes/ubuntu zesty/main all Packages
Ign:8 http://ppa.launchpad.net/fkrull/deadsnakes/ubuntu zesty/main amd64 Packages
Ign:9 http://ppa.launchpad.net/fkrull/deadsnakes/ubuntu zesty/main i386 Packages
Ign:10 http://ppa.launchpad.net/fkrull/deadsnakes/ubuntu zesty/main Translation-en_US
Ign:11 http://ppa.launchpad.net/fkrull/deadsnakes/ubuntu zesty/main Translation-en
Ign:7 http://ppa.launchpad.net/fkrull/deadsnakes/ubuntu zesty/main all Packages
Ign:8 http://ppa.launchpad.net/fkrull/deadsnakes/ubuntu zesty/main amd64 Packages
Ign:9 http://ppa.launchpad.net/fkrull/deadsnakes/ubuntu zesty/main i386 Packages
Ign:10 http://ppa.launchpad.net/fkrull/deadsnakes/ubuntu zesty/main Translation-en_US
Ign:11 http://ppa.launchpad.net/fkrull/deadsnakes/ubuntu zesty/main Translation-en
Ign:7 http://ppa.launchpad.net/fkrull/deadsnakes/ubuntu zesty/main all Packages
Ign:8 http://ppa.launchpad.net/fkrull/deadsnakes/ubuntu zesty/main amd64 Packages
Ign:9 http://ppa.launchpad.net/fkrull/deadsnakes/ubuntu zesty/main i386 Packages
Ign:10 http://ppa.launchpad.net/fkrull/deadsnakes/ubuntu zesty/main Translation-en_US
Ign:11 http://ppa.launchpad.net/fkrull/deadsnakes/ubuntu zesty/main Translation-en
Ign:7 http://ppa.launchpad.net/fkrull/deadsnakes/ubuntu zesty/main all Packages
Ign:8 http://ppa.launchpad.net/fkrull/deadsnakes/ubuntu zesty/main amd64 Packages
Ign:9 http://ppa.launchpad.net/fkrull/deadsnakes/ubuntu zesty/main i386 Packages
Ign:10 http://ppa.launchpad.net/fkrull/deadsnakes/ubuntu zesty/main Translation-en_US
Ign:11 http://ppa.launchpad.net/fkrull/deadsnakes/ubuntu zesty/main Translation-en
Ign:7 http://ppa.launchpad.net/fkrull/deadsnakes/ubuntu zesty/main all Packages
Err:8 http://ppa.launchpad.net/fkrull/deadsnakes/ubuntu zesty/main amd64 Packages
404 Not Found
Ign:9 http://ppa.launchpad.net/fkrull/deadsnakes/ubuntu zesty/main i386 Packages
Ign:10 http://ppa.launchpad.net/fkrull/deadsnakes/ubuntu zesty/main Translation-en_US
Ign:11 http://ppa.launchpad.net/fkrull/deadsnakes/ubuntu zesty/main Translation-en
Hit:12 https://deb.nodesource.com/node_7.x zesty InRelease
Fetched 89.2 kB in 0s (129 kB/s)
Reading package lists... Done
W: The repository 'http://ppa.launchpad.net/fkrull/deadsnakes/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.
E: Failed to fetch http://ppa.launchpad.net/fkrull/deadsnakes/ubuntu/dists/zesty/main/binary-amd64/Packages 404 Not Found
E: Some index files failed to download. They have been ignored, or old ones used instead.
任何想法为什么?如何解决这个问题?
这些是我猜的错误:
Err:8 http://ppa.launchpad.net/fkrull/deadsnakes/ubuntu zesty/main amd64 Packages
404 Not Found
W: The repository 'http://ppa.launchpad.net/fkrull/deadsnakes/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.
E: Failed to fetch http://ppa.launchpad.net/fkrull/deadsnakes/ubuntu/dists/zesty/main/binary-amd64/Packages 404 Not Found
E: Some index files failed to download. They have been ignored, or old ones used instead.
ppa:fkrull/deadsnakes
PPA(Launchpad 链接)仅支持最高 16.04(Xenial)的 Ubuntu 版本。它根本不提供 17.04 (Zesty) 的任何软件包。您必须再次删除存储库,它与您的 Ubuntu 版本不兼容。
如果您添加了存储库
sudo add-apt-repository ppa:fkrull/deadsnakes
,您可以使用以下命令轻松删除它:但是,17.04 已经预装了 Python 2.7:http ://packages.ubuntu.com/zesty/python
无论如何,弄乱系统的 Python 版本是危险的,因为如果您不小心删除了预安装的 Python 版本之一或用不兼容的版本替换它们,它很容易破坏许多重要的应用程序。保持原样。