在 Debian 系统上 yum 命令失效,最根本的原因是:Debian 不使用 yum。
yum(Yellowdog Updater, Modified)是 RHEL / CentOS / Fedora 等 RPM 系 发行版的包管理工具apt / apt-getdpkg➡ 所以 Debian 默认 没有安装 yum,执行会提示:
command not found: yum
yum: command not foundsudo apt update
sudo apt install nginx
sudo apt remove nginx
apt search nginx
只有在以下情况才可能:
但通常需要:
rpm⚠ 极不推荐,容易破坏系统
Debian 上 yum 失效是正常的,因为它本来就不该用 yum。
如果你愿意,可以告诉我:
yum 做什么我可以帮你用 Debian 正确方式 替代。