Ubuntu 安装yum遇坑
1.执行正常下载命令
sudo apt-get install yum
遇到问题,无法定位 E
解决方法:
-
切换到路径
/etc/apt/sources.list
-
vim进入编辑模式,最后一行加上:
deb http://archive.ubuntu.com/ubuntu/ trusty main universe restricted multiverse
-
按ESC然后:wq保存退出
-
更新apt
sudo apt-get update
2.继续执行下载命令
sudo apt-get install yum
遇到问题,apt没有依赖的包
The following packages have unmet dependencies:
yum : Depends: python-sqlitecachec but it is not going to be installed
Depends: python-urlgrabber but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
解决方法:
用aptitude去下载依赖,比较全面
- 先安装aptitude
sudo apt-get install aptitude
- 再使用aptitude安装yum缺少的包(自己缺什么包就下什么,这个只是例子)
sudo aptitude install python-urlgrabber
sudo aptitude install sqlitecachec
3.还是执行下载命令
- 执行前先更新apt和相关依赖
sudo apt update
- 然后下载yum
sudo apt-get install yum