Yeni84
Flight Engineer
Flight Engineer
  • 328 Views

http:// yum repos. Can dnf search and dnf list but cannot install any package

Jump to solution
Hello,
I configured in /etc/yum.repos.d/http.repo file two http:// repositories. The URLs of the repositories were given. I did not add the gpgcheck and enabled directives as per man pages of yum.conf they are 0 (disabled), respectively 1 (enabled)
The dnf repolist shows the repositories id and name but does not show the Status column ( with number of packages each contain).
I cannot dnf install any package/module/package group but dnf search key_word and dnf list provide output.
resolv.conf file was checked and was updated with the nameserver configured.
What would be the reason I cannot dnf install ?
Thank you.
Labels (4)
0 Kudos
1 Solution

Accepted Solutions
Nived
Cadet
Cadet
  • 227 Views

Re: http:// yum repos. Can dnf search and dnf list but cannot install any package

Jump to solution

Hi @Yeni84 

1. Ensure both your repositories are enabled ( enabled=1 ) and checking with a "dnf repolist" command.

2. Ensure you have repodata directory in both the repository locations. This is important for yum/dnf to get information regarding the packages in your repository.

3. After step 1 & step 2, try passing " dnf install tree -y --nogpgcheck". The main yum.conf file has a definition of gpgcheck=1 which means it would do a gpgcheck but in your repositories, you haven't configured any gpg keys. ( Assuming that this is our testing env )

 

Hope this helps! Smiley Happy

View solution in original post

Reply
Loading...
5 Replies
ricardodacosta
Moderator
Moderator
  • 305 Views

Re: http:// yum repos. Can dnf search and dnf list but cannot install any package

Jump to solution

When you browse to the repository URL, do you see a directory called repodata?

What are the contents of /etc/redhat-release and /etc/yum.repos.d/http.repo?

0 Kudos
Reply
Loading...
Yeni84
Flight Engineer
Flight Engineer
  • 272 Views

Re: http:// yum repos. Can dnf search and dnf list but cannot install any package

Jump to solution

Yes, I can see the directory called repodata.

[user1@base-server82 ~]$ cat /etc/redhat-release
Red Hat Enterprise Linux release 8.2 (Ootpa)

[root@server-base ~]# cat /etc/yum.repos.d/http.repo
[HTTP_BaseOS]
name=HTTPlocalrepo_BaseOS
baseurl=http://space1.serverbase.example.com/repo/BaseOS
# I did not add the enabled directive
# I did not add the gpgcheck directive

[HTTP_AppStream]
name=HTTPlocalrepo_AppStream
baseurl=http://space1.serverbase.example.com/repo/AppStream
# I did not add the enabled directive
# I did not add the gpgcheck directive

As a reminder, I cannot dnf install any package/module/package group BUT dnf search key_word and dnf list provide the correct output.

Update: I can see in /etc/yum.conf in [main] that gpgcheck is enabled but in my repo file from /etc/yum.repos.d I did not add this directive at all.

[root@base-server82 ~]# dnf --version
4.2.17

[root@base-server82 ~]# cat /etc/yum.conf
[main]
gpgcheck=1
installonly_limit=3
clean_requirements_on_remove=True
best=True
skip_if_unavailable=False
[root@base-server82 ~]#

0 Kudos
Reply
Loading...
Nived
Cadet
Cadet
  • 228 Views

Re: http:// yum repos. Can dnf search and dnf list but cannot install any package

Jump to solution

Hi @Yeni84 

1. Ensure both your repositories are enabled ( enabled=1 ) and checking with a "dnf repolist" command.

2. Ensure you have repodata directory in both the repository locations. This is important for yum/dnf to get information regarding the packages in your repository.

3. After step 1 & step 2, try passing " dnf install tree -y --nogpgcheck". The main yum.conf file has a definition of gpgcheck=1 which means it would do a gpgcheck but in your repositories, you haven't configured any gpg keys. ( Assuming that this is our testing env )

 

Hope this helps! Smiley Happy

View solution in original post

Reply
Loading...
Yeni84
Flight Engineer
Flight Engineer
  • 217 Views

Re: http:// yum repos. Can dnf search and dnf list but cannot install any package

Jump to solution

The gpgcheck=0; this was the solution. After I added this in my repo files, I could dnf install and dnf list. 

Reply
Loading...
Nivedv
Mission Specialist
Mission Specialist
  • 210 Views

Re: http:// yum repos. Can dnf search and dnf list but cannot install any package

Jump to solution

That's great! Good to know!

Keep querying in RHLC and help the community grow! Smiley Happy

0 Kudos
Reply
Loading...
Join the discussion
You must log in to join this conversation.