linux上yum 安装报错

报错代码

Loaded plugins: fastestmirror, security
Setting up Install Process
Loading mirror speeds from cached hostfile
base                                                             | 3.7 kB     00:00     
extras                                                           | 3.4 kB     00:00     
updates                                                          | 3.4 kB     00:00     
Resolving Dependencies
--> Running transaction check
---> Package mysql.x86_64 0:5.1.73-8.el6_8 will be installed
---> Package mysql-devel.x86_64 0:5.1.73-8.el6_8 will be installed
--> Processing Dependency: openssl-devel for package: mysql-devel-5.1.73-8.el6_8.x86_64
---> Package mysql-server.x86_64 0:5.1.73-8.el6_8 will be installed
--> Processing Dependency: perl-DBD-MySQL for package: mysql-server-5.1.73-8.el6_8.x86_64
--> Running transaction check
---> Package openssl-devel.x86_64 0:1.0.1e-48.el6_8.4 will be installed
--> Processing Dependency: openssl = 1.0.1e-48.el6_8.4 for package: openssl-devel-1.0.1e-48.el6_8.4.x86_64
--> Processing Dependency: zlib-devel for package: openssl-devel-1.0.1e-48.el6_8.4.x86_64
--> Processing Dependency: krb5-devel for package: openssl-devel-1.0.1e-48.el6_8.4.x86_64
---> Package perl-DBD-MySQL.x86_64 0:4.013-3.el6 will be installed
--> Running transaction check
---> Package krb5-devel.x86_64 0:1.10.3-57.el6 will be installed
--> Processing Dependency: krb5-libs = 1.10.3-57.el6 for package: krb5-devel-1.10.3-57.el6.x86_64
--> Processing Dependency: libselinux-devel for package: krb5-devel-1.10.3-57.el6.x86_64
--> Processing Dependency: libcom_err-devel for package: krb5-devel-1.10.3-57.el6.x86_64
--> Processing Dependency: keyutils-libs-devel for package: krb5-devel-1.10.3-57.el6.x86_64
---> Package openssl.i686 0:1.0.1e-48.el6_8.4 will be installed
--> Processing Dependency: libz.so.1 for package: openssl-1.0.1e-48.el6_8.4.i686
--> Processing Dependency: libresolv.so.2 for package: openssl-1.0.1e-48.el6_8.4.i686
--> Processing Dependency: libdl.so.2(GLIBC_2.1) for package: openssl-1.0.1e-48.el6_8.4.i686
--> Processing Dependency: libdl.so.2(GLIBC_2.0) for package: openssl-1.0.1e-48.el6_8.4.i686
--> Processing Dependency: libdl.so.2 for package: openssl-1.0.1e-48.el6_8.4.i686
--> Processing Dependency: libcom_err.so.2 for package: openssl-1.0.1e-48.el6_8.4.i686
--> Processing Dependency: libc.so.6(GLIBC_2.7) for package: openssl-1.0.1e-48.el6_8.4.i686
---> Package zlib-devel.x86_64 0:1.2.3-29.el6 will be installed
--> Running transaction check
---> Package glibc.i686 0:2.12-1.192.el6 will be installed
--> Processing Dependency: glibc-common = 2.12-1.192.el6 for package: glibc-2.12-1.192.el6.i686
--> Processing Dependency: libfreebl3.so(NSSRAWHASH_3.12.3) for package: glibc-2.12-1.192.el6.i686
--> Processing Dependency: libfreebl3.so for package: glibc-2.12-1.192.el6.i686
---> Package keyutils-libs-devel.x86_64 0:1.4-5.el6 will be installed
---> Package krb5-libs.i686 0:1.10.3-57.el6 will be installed
--> Processing Dependency: libselinux.so.1 for package: krb5-libs-1.10.3-57.el6.i686
--> Processing Dependency: libkeyutils.so.1(KEYUTILS_0.3) for package: krb5-libs-1.10.3-57.el6.i686
--> Processing Dependency: libkeyutils.so.1 for package: krb5-libs-1.10.3-57.el6.i686
---> Package libcom_err.i686 0:1.41.12-22.el6 will be installed
---> Package libcom_err-devel.x86_64 0:1.41.12-22.el6 will be installed
---> Package libselinux-devel.x86_64 0:2.0.94-7.el6 will be installed
--> Processing Dependency: libsepol-devel >= 2.0.32-1 for package: libselinux-devel-2.0.94-7.el6.x86_64
--> Processing Dependency: pkgconfig(libsepol) for package: libselinux-devel-2.0.94-7.el6.x86_64
---> Package zlib.i686 0:1.2.3-29.el6 will be installed
--> Running transaction check
---> Package glibc.i686 0:2.12-1.192.el6 will be installed
--> Processing Dependency: glibc-common = 2.12-1.192.el6 for package: glibc-2.12-1.192.el6.i686
---> Package keyutils-libs.i686 0:1.4-5.el6 will be installed
---> Package libselinux.i686 0:2.0.94-7.el6 will be installed
---> Package libsepol-devel.x86_64 0:2.0.41-4.el6 will be installed
---> Package nss-softokn-freebl.i686 0:3.14.3-23.3.el6_8 will be installed
--> Finished Dependency Resolution
Error: Package: glibc-2.12-1.192.el6.i686 (base)
           Requires: glibc-common = 2.12-1.192.el6
           Installed: glibc-common-2.12-1.209.el6.x86_64 (@anaconda-CentOS-201703281317.x86_64/6.9)
               glibc-common = 2.12-1.209.el6
           Available: glibc-common-2.12-1.192.el6.x86_64 (base)
               glibc-common = 2.12-1.192.el6
 You could try using --skip-broken to work around the problem
 You could try running: rpm -Va --nofiles --nodigest

这里的问题是版本问题。

解决方案:

wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
sed -i  's/$releasever/7/g' /etc/yum.repos.d/CentOS-Base.repo
yum repolist 

重新安装即可成功

第二次又遇到新的报错:

Error: Depsolving loop limit reached.
Error: Package: satyr-0.16-2.el6.x86_64 (@anaconda-CentOS-201703281317.x86_64/6.9)
           Requires: librpm.so.1()(64bit)
           Removing: rpm-libs-4.8.0-55.el6.x86_64 (@anaconda-CentOS-201703281317.x86_64/6.9)
               librpm.so.1()(64bit)
           Updated By: rpm-libs-4.11.3-48.el7_9.x86_64 (updates)
               Not found
Error: Package: 1:readahead-1.5.6-2.el6.x86_64 (@anaconda-CentOS-201703281317.x86_64/6.9)
           Requires: upstart
           Removing: upstart-0.6.5-16.el6.x86_64 (@anaconda-CentOS-201703281317.x86_64/6.9)
               upstart = 0.6.5-16.el6
           Obsoleted By: systemd-219-78.el7_9.7.x86_64 (updates)
               Not found
Error: Package: cas-0.15-1.el6.1.noarch (@anaconda-CentOS-201703281317.x86_64/6.9)
           Requires: python(abi) = 2.6
           Removing: python-2.6.6-66.el6_8.x86_64 (@anaconda-CentOS-201703281317.x86_64/6.9)
               python(abi) = 2.6
           Updated By: python-2.7.5-93.el7_9.x86_64 (updates)
               python(abi) = 2.7
               python(abi) = 2.7
           Available: python-2.7.5-89.el7.x86_64 (base)
               python(abi) = 2.7
               python(abi) = 2.7
           Available: python-2.7.5-90.el7.x86_64 (updates)
               python(abi) = 2.7
               python(abi) = 2.7
           Available: python-2.7.5-92.el7_9.x86_64 (updates)
               python(abi) = 2.7
               python(abi) = 2.7
           Available: python3-3.6.8-17.el7.i686 (base)
               python(abi) = 3.6
               python(abi) = 3.6
           Available: python3-3.6.8-18.el7.i686 (updates)
               python(abi) = 3.6
               python(abi) = 3.6
           Available: python3-3.6.8-19.el7_9.i686 (updates)
               python(abi) = 3.6
               python(abi) = 3.6
Error: Package: python-argparse-1.2.1-2.1.el6.noarch (@anaconda-CentOS-201703281317.x86_64/6.9)
           Requires: python(abi) = 2.6
           Removing: python-2.6.6-66.el6_8.x86_64 (@anaconda-CentOS-201703281317.x86_64/6.9)
               python(abi) = 2.6
           Updated By: python-2.7.5-93.el7_9.x86_64 (updates)
               python(abi) = 2.7
               python(abi) = 2.7
           Available: python-2.7.5-89.el7.x86_64 (base)
               python(abi) = 2.7
               python(abi) = 2.7
           Available: python-2.7.5-90.el7.x86_64 (updates)
               python(abi) = 2.7
               python(abi) = 2.7
           Available: python-2.7.5-92.el7_9.x86_64 (updates)
               python(abi) = 2.7
               python(abi) = 2.7
           Available: python3-3.6.8-17.el7.i686 (base)
               python(abi) = 3.6
               python(abi) = 3.6
           Available: python3-3.6.8-18.el7.i686 (updates)
               python(abi) = 3.6
               python(abi) = 3.6
           Available: python3-3.6.8-19.el7_9.i686 (updates)
               python(abi) = 3.6
               python(abi) = 3.6
Error: Package: grep-2.20-6.el6.x86_64 (@anaconda-CentOS-201703281317.x86_64/6.9)
           Requires: libpcre.so.0()(64bit)
           Removing: pcre-7.8-7.el6.x86_64 (@anaconda-CentOS-201703281317.x86_64/6.9)
               libpcre.so.0()(64bit)
           Updated By: pcre-8.32-17.el7.x86_64 (base)
               Not found
Error: Package: python-iwlib-0.1-1.2.el6.x86_64 (@anaconda-CentOS-201703281317.x86_64/6.9)
           Requires: libpython2.6.so.1.0()(64bit)
           Removing: python-libs-2.6.6-66.el6_8.x86_64 (@anaconda-CentOS-201703281317.x86_64/6.9)
               libpython2.6.so.1.0()(64bit)
           Updated By: python-libs-2.7.5-93.el7_9.x86_64 (updates)
               Not found
Error: Package: python-iwlib-0.1-1.2.el6.x86_64 (@anaconda-CentOS-201703281317.x86_64/6.9)
           Requires: python(abi) = 2.6
           Removing: python-2.6.6-66.el6_8.x86_64 (@anaconda-CentOS-201703281317.x86_64/6.9)
               python(abi) = 2.6
           Updated By: python-2.7.5-93.el7_9.x86_64 (updates)
               python(abi) = 2.7
               python(abi) = 2.7
           Available: python-2.7.5-89.el7.x86_64 (base)
               python(abi) = 2.7
               python(abi) = 2.7
           Available: python-2.7.5-90.el7.x86_64 (updates)
               python(abi) = 2.7
               python(abi) = 2.7
           Available: python-2.7.5-92.el7_9.x86_64 (updates)
               python(abi) = 2.7
               python(abi) = 2.7
           Available: python3-3.6.8-17.el7.i686 (base)
               python(abi) = 3.6
               python(abi) = 3.6
           Available: python3-3.6.8-18.el7.i686 (updates)
               python(abi) = 3.6
               python(abi) = 3.6
           Available: python3-3.6.8-19.el7_9.i686 (updates)
               python(abi) = 3.6
               python(abi) = 3.6
Error: Package: hal-info-20090716-5.el6.noarch (@anaconda-CentOS-201703281317.x86_64/6.9)
           Requires: hal >= 0.5.10
           Removing: hal-0.5.14-14.el6.x86_64 (@anaconda-CentOS-201703281317.x86_64/6.9)
               hal = 0.5.14-14.el6
           Obsoleted By: systemd-219-78.el7_9.7.x86_64 (updates)
               Not found
 You could try using --skip-broken to work around the problem
 You could try running: rpm -Va --nofiles --nodigest

知道是yum源的问题,但是找了很长时间都没有找到一个能用的,再极度不服的心理状态下终于有了回报:get到一个yum源,分享一下,希望对有需要得人有用

如下设置:

sed -i "s|enabled=1|enabled=0|g" /etc/yum/pluginconf.d/fastestmirror.conf

mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup

curl  -o /etc/yum.repos.d/CentOS-Base.repo https://www.xmpan.com/Centos-6-Vault-Aliyun.repo

yum clean all

yum makecache

肝到半夜,最终还是成功了:

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

月初,

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值