cancel
Showing results for 
Search instead for 
Did you mean: 
Yeni84
Flight Engineer
Flight Engineer
  • 9,580 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
  • 9,479 Views

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! :)

View solution in original post

9 Replies
ricardodacosta
Moderator
Moderator
  • 9,557 Views

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
Yeni84
Flight Engineer
Flight Engineer
  • 9,524 Views

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
Nived
Cadet
Cadet
  • 9,480 Views

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! :)

Yeni84
Flight Engineer
Flight Engineer
  • 9,469 Views

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

Nivedv
Mission Specialist
Mission Specialist
  • 9,462 Views

That's great! Good to know!

Keep querying in RHLC and help the community grow! :)

0 Kudos
melnajim
Flight Engineer
Flight Engineer
  • 6,851 Views

Hello 

I passed exam ex200 but question a bout yum add repos not working 

this are my config during this exam  

in /etc/yum.repo/local.repo, i have added these information 

[BaseOS]

name=Baseos

baseurl=http://xxxxxxxxxx/BaseOS

pgpcheck=0

enabled=1

my question what wrong in this file, could-you help me i lost my exam because this config not working  

0 Kudos
melnajim
Flight Engineer
Flight Engineer
  • 6,848 Views

on exam this config not working i'm sure if don't activate pgpcheck=1 and pgpkey=///etc/pki/xxx, you can't install anything, howover if u have any solution could-you say it please   

0 Kudos
melnajim
Flight Engineer
Flight Engineer
  • 6,852 Views

Hello 

I passed exam ex200 but question a bout yum add repos not working 

this are my config during this exam  

in /etc/yum.repo/local.repo, i have added these information 

[BaseOS]

name=Baseos

baseurl=http://xxxxxxxxxx/BaseOS

pgpcheck=0

enabled=1

my question what wrong in this file, could-you help me i lost my exam because this config not working  

0 Kudos
Fran_Garcia
Starfighter Starfighter
Starfighter
  • 6,825 Views

the directive is not pgpcheck, but gpgcheck

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