【yum命令】使用yum报错:There are no enabled repos. Run “yum repolist all“ to see the repos you have.

时间:2025-03-10 09:15:38

在ubuntu上安装了yum,执行yum命令就报错:

There are no enabled repos. Run “yum repolist all” to see the repos you have. You can enable repos

按照提示输入yum repolist all,啥也没有,百度查了一堆,乱七八糟,都不行。弄了我好久。后来知道为啥了。

我就不该安装yum,因为我用的是Ubuntu。
一般来说Linux系统基本上分两大类:

RedHat系列:Redhat、Centos、Fedora等
Debian系列:DDebian、Ubuntu等…

RedHat系列:

  • 常见的安装包格式rpm包、安装rpm包的命令:rpm-参数
  • 包管理工具yum
  • 支持tar包

Debian系列:

  • 常见的安装包格式deb包、安装rpm包的命令:deb-参数
  • 包管理工具apt-get
  • 支持tar包

所以,也就是说,直接用apt-get就行了,别用yum。