yum安装失败
使用sudo apt-get install yum安装
The following packages have unmet dependencies:
yum : Depends: python-lzma but it is not going to be installed
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.
出现问题的原因是需要依赖,使用apt-get无法自动安装相应的依赖。
解决方案
利用aptitude来安装,安装成功
sudo aptitude install python-dev
aptitude与apt-get都可以进行安装,aptitude在处理包依赖问题上更好。
yum安装成功后,repolist:0
http://mirrors.aliyun.com/centos/%24releasever/os/x86_64/repodata/repomd.xml: [Errno 14] HTTP Error 404 - Not Found
Trying other mirror.
镜像出现了问题,试了好多镜像地址都不行,经过了多次尝试找到了一个可以用的。
curl -o /etc/yum.repos.d/CentOS-Base.repo https://www.xmpan.com/Centos-6-Vault-Aliyun.repo
然后需要更新yum
yum clean all
yum makecache