Linux – centos 7 – yum update failed

centos7linuxssh

I can't install control panel because yum update failed. I use centos7. Please help me…. What should I do?

[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 ~]#

Best Answer

If you check your error message, you'll see that update packages contains el6.x86_64 prefix, that rpm package for CentOS 6. Looks like you install EPEL for CentOS 6. Remove wrong repo(for example, rpm -qa | grep epel | xargs rpm -e or rm /etc/yum.repos.d/epel*.repo if you install it manually), run yum clean all, install right EPEL trough yum install epel-release and try to run yum update again.