0

I decided to upgrade a remote 'live' server from CentOS 7 to 8. I followed the instructions here https://www.tecmint.com/upgrade-centos-7-to-centos-8/ and got into an endless loop of failures.

# dnf upgrade [or --refresh]
Error: Transaction check error:
file /usr/lib/python2.7/site-packages/six.py from install of python2-six-1.11.0-5.module_el8.2.0+381+9a5b3c3b.noarch conflicts with file from package python-six-1.9.0-2.el7.noarch
file /usr/lib/python2.7/site-packages/six.pyc from install of python2-six-1.11.0-5.module_el8.2.0+381+9a5b3c3b.noarch conflicts with file from package python-six-1.9.0-2.el7.noarch
file /usr/lib/python2.7/site-packages/six.pyo from install of python2-six-1.11.0-5.module_el8.2.0+381+9a5b3c3b.noarch conflicts with file from package python-six-1.9.0-2.el7.noarch

# dnf update --best --allowerasing
CentOS-8 - Base
CentOS-8 - Updates
CentOS-8 - Extras
CentOS-8 - Plus
Failed to synchronize cache for repo 'base', ignoring this repo.
Failed to synchronize cache for repo 'updates', ignoring this repo.
Failed to synchronize cache for repo 'extras', ignoring this repo.
Failed to synchronize cache for repo 'centosplus', ignoring this repo.
Last metadata expiration check: 0:00:38 ago on Sun 18 Oct 2020 07:20:52 AM UTC.
Error: 
Problem: The operation would result in removing the following protected packages: dnf

Other attempts lead to obscure messages about duplicate repos or using mirrorlist instead of baseurl. None of the solutions I find on the web work and it's the 1st time I use dnf (was using yum before that attempt).

dargaud
  • 183
  • 6

1 Answers1

1

Your issue is related to unwanted Repository to download package , please find it disable it

disable Unwanted Repo, failed to download by ( as sample ):

remove repo package or moved from repo folder to temp folder( as backup ) or using subscription-manager command :

 # subscription-manager repos --disable [repo-package]-x86_64-rpms  
 # subscription-manager repos --enable [repo-package]-x86_64-rpms

run command to cleanup cache and download metafile again

sudo dnf clean all
sudo rm -r /var/cache/dnf
sudo dnf upgrade
  • Thanks but I'm not sure I understand. Should I replace [repo-package] from you instructions by 'base' 'updates', 'extras' and 'Plus' ? – dargaud Oct 18 '20 at 17:19
  • 1
    You receive six package in Two different Repo and they have conflict , you must disable one of them – MohammadReza moeini Oct 18 '20 at 18:54
  • And also there's no such executable. dnf search subscription-manager gives subscription-manager-initial-setup-addon, subscription-manager-migration and -data, but all installs failed: nothing provides subscription-manager – dargaud Oct 18 '20 at 18:55
  • Attempts to direct install a subscription-manager rpm leads to tons of "nothing provides..." python3-dmidecode, dnf-plugin, usermode, virt-what and others... – dargaud Oct 18 '20 at 18:58
  • 1
    Try dnf config-manager https://docs.fedoraproject.org/en-US/Fedora/23/html/System_Administrators_Guide/sec-Managing_DNF_Repositories.html – MohammadReza moeini Oct 18 '20 at 19:01
  • `dnf config-manager --set-disable base-x86_64-rpms` -> No such command: config-manager – dargaud Oct 19 '20 at 20:52
  • 1
    please find repo file in directory and moved it to another place for example your home https://www.if-not-true-then-false.com/2010/yum-remove-repo-repository-yum-disable-repo-repository/ – MohammadReza moeini Oct 20 '20 at 04:54
  • OK, thank you. I was just about to try that when a backup was found and restored, so I'll never known whether or not it would have worked, Thanks anyway. – dargaud Oct 20 '20 at 19:11