Can't add epel repo to 9.3

Hi, I’m fairly new to Rocky, but not to Linux and I can’t believe I’m having an issue on something as simple as adding the epel repository to my system, but there you go:

[root@ns8 ~]# dnf repolist
repo id                         repo name
crb                             Rocky Linux 9 - CRB
ns-appstream                    NS8 Rocky Linux 9 - AppStream
ns-baseos                       NS8 Rocky Linux 9 - BaseOS
[root@ns8 ~]#
[root@ns8 ~]#
[root@ns8 ~]# dnf install epel-release
Last metadata expiration check: 0:01:35 ago on Wed Apr 24 13:20:22 2024.
No match for argument: epel-release
Error: Unable to find a match: epel-release
[root@ns8 ~]# dnf list epel-release
Last metadata expiration check: 0:01:59 ago on Wed Apr 24 13:20:22 2024.
Error: No matching Packages to list
[root@ns8 ~]#

So what silly balls up am I making.

Cheers.

You are missing the extras repository. Without that repository, you won’t have access to epel-release, among other packages.

Guess for some reason it isn’t enabled:

[root@ns8 yum.repos.d]# ls -l
total 32
-rw-r--r--. 1 root root  616 Apr 15 01:39 nethserver.repo
-rw-r--r--. 1 root root 6610 Apr  3 19:01 rocky-addons.repo
-rw-r--r--. 1 root root 1165 Apr  3 19:01 rocky-devel.repo
-rw-r--r--. 1 root root 2379 Apr 15 01:39 rocky-extras.repo
-rw-r--r--. 1 root root 2387 Apr  3 19:01 rocky-extras.repo.rpmnew
-rw-r--r--. 1 root root 3405 Apr 23 18:55 rocky.repo
-rw-r--r--. 1 root root 3417 Apr  3 19:01 rocky.repo.rpmnew
[root@ns8 yum.repos.d]#

Cheers.

You’ve got two versions of the rocky extras repo. Maybe you edited one of them at some point?

No, only one. Only files with extension *.repo define repos. The other filename ends with .rpmnew.


The rocky-extras.repo is flagged as config file in the RPM package.

When package is updated, files of old version are removed and files of now version are added.

User (admin) may modify config files. If they are simply replaced on update, then modifications are lost. That’s why files flagged as config get special treatment.


There is a modified config file. What should dnf do?

  • Plain replace is not the option
  • Merge of changes is above paygrade of dnf
  • Keep the old file and store the new as rocky-extras.repo.rpmnew
    The user can merge the changes from update.
  • Rename the old file to rocky-extras.repo.rpmold, save new file as rocky-extras.repo
    The users have to merge their modifications, if they still want them.

As corollary, if you remove a package that has modified config files, those are stored with .rpmsave suffix.

One could seek /etc for *.rpm{new,old,save} after updates to spot things that may need attention. (The dnf does mention events, but how closely do we stare at its output?)


We do see that both rocky-extras.repo and rocky.repo have been modified.

We do also see that the modifications in rocky.repo have renamed baseos and appstream and probably changed other attributes too. Perhaps you have local mirror for them (but not for ‘crb’)?

Yeah, it’s a pre-built image of Nethserver. Guess I’m going have to wrangle with them as to the best way to handle the BaseOS and AppStream Repositories and to add the Extras repo.

Cheers.

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.