AlmaLinux: "The following repositories are defined multiple times"
AnsweredHi everyone,
I had a hurdle a couple of days ago when updating one of our servers from CentOS 7 to AlmaLinux 8. I fixed it in the end, but I found very little information about it online, so I will write what I did here in case anyone has the same problem.
Firstly, I ran the commands from https://cpanel.github.io/elevate/
"/scripts/elevate-cpanel --check" told me there were no issues, and that I could proceed - this wasn't correct so someone at cPanel might want to add a check to the Elevate script in future
"/scripts/elevate-cpanel --start" failed every time, with the below error:
* 2024-06-07 17:19:46 [WARN] *** Elevation Blocker detected: ***
A YUM/DNF repository defined multiple times
The following repositories are defined multiple times inside the "upgrade" container:
-MariaDB101
- MariaDB102
Possible resolution: Remove the duplicate repository definitions or change repoids of conflicting repositories on the system to prevent the conflict.
I don't know how common this error is likely to be, but I was very confused by it. However, the fix ultimately turned out to be very easy.
Go to your repo list on the server: cd /etc/yum.repos.d/
Read each of the files there; they are quite short. If your error also specifies that the duplicate repos are MariaDB, you can find which version is currently in use either by looking on the server, or by running mariadb -V . I didn't have any problems when I deleted the ones named in the error, but it didn't fix the problem until I also looked at the files for the current version (for me, we had MariaDB106.repo and MariaDB106-new.repo). One of those contained a line saying "enabled=0", and also, at the top of the file in square brackets, it said, "[MariaDB102]" and I think that's why the error said MariaDB102 even after I had deleted that file.
Since that repo is presumably disabled, I deleted that one too. Then I ran the Elevate script again, and it worked perfectly!
Thanks for reading; hopefully this information will help somebody if they have the same problem. If there was an easier fix, please feel free to say what it was.
-
Hey there! Thanks for sharing this. The fix you performed is correct, but I would have expected the "--check" tool to catch that. I'll bring that up with the ELevate team!
0 -
Update - I just wanted to let you know I've created case RE-452 for the developers to see if they can get this added to the --check portion of the run. If I get any updates on my end I'll be sure to post them here!
0 -
I same problem when update CL7 to Almalinux 8 with error "1. Inhibitor: A YUM/DNF repository defined multiple times". Please any ideas!
0 -
trusting ai - did you check the repositories manually on the server?
0 -
Update - we've added this as a blocker to the ELevate tool so it will not proceed if there are duplicate repo entries.
0
Please sign in to leave a comment.
Comments
5 comments