Issues installing Erlang

Hello Friends

I have a clean installation of AlmaLinx 8.5 running in a VM for some testing, or probably more correctly me just playing around. I am trying to get the latest version of Erlang installed. I have taken the following step which pretty much match the direction on Erlang-Solutions website.

sudo dnf config-manager --set-enabled powertools 
sudo dnf install epel-release

sudo tee /etc/yum.repos.d/erlang-solutions.repo << "EOF"
name=CentOS $releasever - $basearch - Erlang Solutions

sudo dnf -y install erlang

This seems to work, however, after when I do an update, I get the following error:

sudo dnf update
 Problem: cannot install both erlang-dialyzer-22.0.7-1.el8.x86_64 and erlang-dialyzer-24.1.7-1.el8.x86_64
  - cannot install the best update candidate for package erlang-typer-24.1.7-1.el8.x86_64
  - cannot install the best update candidate for package erlang-dialyzer-24.1.7-1.el8.x86_64
(try to add '--allowerasing' to command line to replace conflicting packages or '--skip-broken' to skip uninstallable packages or '--nobest' to use not only best candidate packages)

The suggestion of using the ‘–allowerasing’ help, but I would prefer not to have to uses this every time I do anything with DNF. Also, my Googling is not getting me anywhere. Any help would be appreciated.

Thank you

You have two enabled repositories that both do provide erlang. That is one too many.

Can you exclude packages of the repo, whose version you don’t want? Perhaps:

dnf config-manager --save --setopt=exclude=* <repo>

where <repo> is the repoid of the one that has those “22.0.7” packages.

Interesting, I was not a where of that functionality in DNF and my not be sure how to use it.

The “22.0.7” packages are coming from the EPEL repo. I was wanting something newer, that is why I added the Erlang-Solutions repo. The instruction for adding the erlang-solutions repo say to enable the EPEL repo and Erlang will not install without it.

Would this be the correct way to uses your suggestion?

dnf config-manager --save --setopt=exclude=*epel

Will this have unintended consequences, such as excluding all the EPEL repo?

Thank you

Seems to lack a space and (my mistake) the erlang:

dnf config-manager --save --setopt=exclude=erlang* epel

What it should do, is to find the /etc/yum.repos.d/*.repo file that contains section [epel] and and add to that section line exclude=erlang*

This is what I was looking for.

However, after doing some Googling, I believe the command should be:

dnf config-manager --save --setopt=*.exclude=erlang* epel

Thank you