# Can't add epel repo to 9.3

**URL:** <https://forums.rockylinux.org/t/cant-add-epel-repo-to-9-3/13730>\
**Category:** Rocky Linux Help & Support\
**Tags:** rocky-linux-9\
**Created:** [April 24, 2024, 8:41pm UTC](https://forums.rockylinux.org/t/cant-add-epel-repo-to-9-3/13730 "2024-04-24T20:41:50Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![EddieA](https://avatars.discourse-cdn.com/v4/letter/e/85e7bf/32.png) [@EddieA](https://forums.rockylinux.org/u/EddieA)\
**Post date:** [April 24, 2024, 8:41pm UTC](https://forums.rockylinux.org/t/cant-add-epel-repo-to-9-3/13730/1 "2024-04-24T20:41:50Z")

</div>

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:

```auto
[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.

---

<div class="post-metadata">

**Author:** ![label](https://avatars.discourse-cdn.com/v4/letter/l/c5a1d2/32.png) [@label](https://forums.rockylinux.org/u/label)\
**Post date:** [April 24, 2024, 8:42pm UTC](https://forums.rockylinux.org/t/cant-add-epel-repo-to-9-3/13730/2 "2024-04-24T20:42:52Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![EddieA](https://avatars.discourse-cdn.com/v4/letter/e/85e7bf/32.png) [@EddieA](https://forums.rockylinux.org/u/EddieA)\
**Post date:** [April 24, 2024, 8:45pm UTC](https://forums.rockylinux.org/t/cant-add-epel-repo-to-9-3/13730/3 "2024-04-24T20:45:46Z")

</div>

> [@label](#):
>
> You are missing the extras repository

Guess for some reason it isn’t enabled:

```auto
[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.

---

<div class="post-metadata">

**Author:** ![gerry666uk](https://avatars.discourse-cdn.com/v4/letter/g/dbc845/32.png) [@gerry666uk](https://forums.rockylinux.org/u/gerry666uk)\
**Post date:** [April 24, 2024, 9:34pm UTC](https://forums.rockylinux.org/t/cant-add-epel-repo-to-9-3/13730/4 "2024-04-24T21:34:47Z")

</div>

> [@EddieA](#):
>
> `rocky-extras.repo`

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

---

<div class="post-metadata">

**Author:** ![jlehtone](https://avatars.discourse-cdn.com/v4/letter/j/e9a140/32.png) [@jlehtone](https://forums.rockylinux.org/u/jlehtone)\
**Post date:** [April 25, 2024, 6:17am UTC](https://forums.rockylinux.org/t/cant-add-epel-repo-to-9-3/13730/5 "2024-04-25T06:17:15Z")

</div>

> [@gerry666uk](#):
>
> You’ve got two versions of the rocky extras repo.

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?)

* * *

> [@EddieA](#):
>
> Guess for some reason it isn’t enabled:

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

> [@EddieA](#):
>
> ```auto
> ns-appstream NS8 Rocky Linux 9 - AppStream
> ns-baseos NS8 Rocky Linux 9 - BaseOS
> 
> ```

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’)?

---

<div class="post-metadata">

**Author:** ![EddieA](https://avatars.discourse-cdn.com/v4/letter/e/85e7bf/32.png) [@EddieA](https://forums.rockylinux.org/u/EddieA)\
**Post date:** [April 25, 2024, 6:45am UTC](https://forums.rockylinux.org/t/cant-add-epel-repo-to-9-3/13730/6 "2024-04-25T06:45:59Z")

</div>

> [@jlehtone](#):
>
> We do see that both `rocky-extras.repo` and `rocky.repo` have been modified.
> 
> > [@EddieA](#):
> >
> > ```auto
> > ns-appstream NS8 Rocky Linux 9 - AppStream
> > ns-baseos NS8 Rocky Linux 9 - BaseOS
> > 
> > ```
> 
> 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](https://www.nethserver.org/). 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.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex020/uploads/rockylinux/original/1X/91b7219eec10e30013422e4df76c1d898711a5d5.svg) [@system](https://forums.rockylinux.org/u/system)\
**Post date:** [June 24, 2024, 6:46am UTC](https://forums.rockylinux.org/t/cant-add-epel-repo-to-9-3/13730/7 "2024-06-24T06:46:20Z")

</div>

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