我无法安装控制面板,因为 yum 更新失败。我使用的是 centos7。请帮帮我....我该怎么办?
[root@trial ~]# yum
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: mirror.nes.co.id
* centosplus: mirror.nes.co.id
* epel: epel.mirror.angkasa.id
* extras: mirror.axarva.id
* updates: mirror.nes.co.id
Resolving Dependencies
There are unfinished transactions remaining. You might consider running yum-complete-transaction, or "yum-complete-transaction --cleanup-only" and "yum history redo last", first to finish them. If those don't work you'll have to try removing/installing packages by hand (maybe package-cleanup can help).
The program yum-complete-transaction is found in the yum-utils package.
--> Running transaction check
---> Package nettle.x86_64 0:2.7.1-8.el7 will be updated
--> Processing Dependency: libhogweed.so.2()(64bit) for package: gnutls-3.3.26-9.el7.x86_64
--> Processing Dependency: libnettle.so.4()(64bit) for package: gnutls-3.3.26-9.el7.x86_64
---> Package nettle.x86_64 0:3.2-2.el6 will be an update
--> Processing Dependency: libgmp.so.3()(64bit) for package: nettle-3.2-2.el6.x86_64
--> Finished Dependency Resolution
Error: Package: gnutls-3.3.26-9.el7.x86_64 (@base)
Requires: libhogweed.so.2()(64bit)
Removing: nettle-2.7.1-8.el7.x86_64 (@base)
libhogweed.so.2()(64bit)
Updated By: nettle-3.2-2.el6.x86_64 (epel)
~libhogweed.so.4()(64bit)
Error: Package: nettle-3.2-2.el6.x86_64 (epel)
Requires: libgmp.so.3()(64bit)
Error: Package: gnutls-3.3.26-9.el7.x86_64 (@base)
Requires: libnettle.so.4()(64bit)
Removing: nettle-2.7.1-8.el7.x86_64 (@base)
libnettle.so.4()(64bit)
Updated By: nettle-3.2-2.el6.x86_64 (epel)
~libnettle.so.6()(64bit)
You could try using --skip-broken to work around the problem
You could try running: rpm -Va --nofiles --nodigest
[root@trial ~]#
答案1
如果你检查错误消息,你会看到更新包包含版本 6.x86_64前缀,该 rpm 包适用于 CentOS 6。看起来您为 CentOS 6 安装了 EPEL。删除错误的 repo(例如,rpm -qa | grep epel | xargs rpm -e
或者rm /etc/yum.repos.d/epel*.repo
如果您手动安装它),运行yum clean all
,安装正确的 EPELyum install epel-release
并尝试yum update
再次运行。