我已从 Amazon Ec-2 实例中卸载了 Python 和 Yum。并且无法安装任何东西...
系统信息:
[ec2-user]$ cat /etc/os-release
得到这个:
NAME="Amazon Linux"
VERSION="2"
ID="amzn"
ID_LIKE="centos rhel fedora"
VERSION_ID="2"
PRETTY_NAME="Amazon Linux 2"
ANSI_COLOR="0;33"
CPE_NAME="cpe:2.3:o:amazon:amazon_linux:2"
HOME_URL="https://amazonlinux.com/"
根本没有好吃的:
[ec2-user]$ which yum
/usr/bin/which: no yum in (/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin)
我已经下载了 yum 版本并尝试在本地安装:
[ec2-user]$ curl --silent http://mirror.centos.org/centos/7/os/x86_64/Packages/yum-3.4.3-168.el7.centos.noarch.rpm --remote-name
[ec2-user]$ rpm --verbose --install yum-3.4.3-168.el7.centos.noarch.rpm
但出现失败的部门错误:
warning: yum-3.4.3-168.el7.centos.noarch.rpm: Header V3 RSA/SHA256 Signature, key ID f4a80eb5: NOKEY
error:
Failed dependencies:
/usr/bin/python is needed by yum-3.4.3-168.el7.centos.noarch
python >= 2.4 is needed by yum-3.4.3-168.el7.centos.noarch
python(abi) = 2.7 is needed by yum-3.4.3-168.el7.centos.noarch
python-sqlite is needed by yum-3.4.3-168.el7.centos.noarch
yum-plugin-fastestmirror is needed by yum-3.4.3-168.el7.centos.noarch
我正在尝试安装 python,但收到错误,因为构建必需工具也没有安装...请帮助我,如何在没有 yum 的情况下安装构建必需工具并修复错误?
我在 Stack Exchange 上发现了这个问题。 如何完全删除并重新安装python(不使用yum)?
我希望这可以帮助你......