1

I have upgraded just before my centos 7 to centos 8. after a few hours of effort with the guide, I was upgraded.

now I am trying to use yum for a couple of dependencies. as I have removed yum I am trying to add the yum again using dnf install yum but I am getting the following error.

Running transaction 
Preparing        :  1/1
Installing       : yum-4.7.0-4.el8.noarch 1/1
Error unpacking rpm package yum-4.7.0-4.el8.noarch
Verifying        : yum-4.7.0-4.el8.noarch 1/1
Failed:
yum-4.7.0-4.el8.noarch


[root@cent8 ~]# uname -r
4.18.0-348.2.1.el8_5.x86_64
[root@cent8 ~]# cat /etc/centos-release
CentOS Linux release 8.5.211

any help is appreciated.

Naresh A
  • 21
  • 1
  • 6

2 Answers2

1

This error occurs when the package cannot be extracted, usually because there are existing files located at the paths it tries to extract to.

You can easily find the files located in the package here. Just check that none of those files exist. In my case, the conflict was due to symlinks inside /etc/yum that were created there for some reason. It's safe to remove them, since they will be recreated by the package anyway.

IS4
  • 1,440
  • 1
  • 12
  • 18
  • Thanks for the suggestions @IS4 I have removed all the configurations related to yum at ```/etc/yum``` already. I am not sure somehow it is got resolved after the restart, I guess the problem with the symlinks only. – Naresh A Jan 18 '22 at 07:35
0

yes , this happens when we got one symlink in the same location of one (regular) file on the rpm that you want install so removing the symbol link before yum/dnf install, will fix the problem

Sérgio
  • 101
  • 2
  • Please don't duplicate other answers. IS4 said what you did over a month ago, with more detail. – Karu Apr 07 '22 at 14:31
  • IMHO, I think is a different information, my answer is not about existing files, is about existing one symbol link with the same name of the file that rpm want extract. – – Sérgio Apr 08 '22 at 15:56