CentOS 8.3.2011 rpm install error 'centos-repos(8) conflicts with centos-linux-repos-8-2.el8.noarch'

Issues related to applications and software problems and general support
Post Reply
gdsotirov
Posts: 4
Joined: 2021/01/14 09:14:41

CentOS 8.3.2011 rpm install error 'centos-repos(8) conflicts with centos-linux-repos-8-2.el8.noarch'

Post by gdsotirov » 2021/01/14 09:52:33

Hello,

I'm trying to setup a chroot environment with minimal CentOS 8.3.2011 installation in a GCP virtual machine. The command I use is:

Code: Select all

rpm --root=/base/centos-8 \
    -ivh \
    'http://mirror.centos.org/centos/8.3.2011/BaseOS/x86_64/os/Packages/centos-linux-release-8.3-1.2011.el8.noarch.rpm' \
    'http://mirror.centos.org/centos/8.3.2011/BaseOS/x86_64/os/Packages/centos-gpg-keys-8-2.el8.noarch.rpm' \
    'http://mirror.centos.org/centos/8.3.2011/BaseOS/x86_64/os/Packages/centos-linux-repos-8-2.el8.noarch.rpm'
On the first execution the command finishes successfully with the following output:

Code: Select all

Retrieving http://mirror.centos.org/centos/8.3.2011/BaseOS/x86_64/os/Packages/centos-linux-release-8.3-1.2011.el8.noarch.rpm
Retrieving http://mirror.centos.org/centos/8.3.2011/BaseOS/x86_64/os/Packages/centos-gpg-keys-8-2.el8.noarch.rpm
Retrieving http://mirror.centos.org/centos/8.3.2011/BaseOS/x86_64/os/Packages/centos-linux-repos-8-2.el8.noarch.rpm
warning: /base/centos-8/var/tmp/rpm-tmp.oUQrYZ: Header V3 RSA/SHA256 Signature, key ID 8483c65d: NOKEY
Verifying...                          ################################# [100%]
Preparing...                          ################################# [100%]
Updating / installing...
   1:centos-gpg-keys-1:8-2.el8        ################################# [ 33%]
   2:centos-linux-repos-8-2.el8       ################################# [ 67%]
   3:centos-linux-release-8.3-1.2011.e################################# [100%]
However, on the second (and consecutive) execution(s) it fails with this output:

Code: Select all

Retrieving http://mirror.centos.org/centos/8.3.2011/BaseOS/x86_64/os/Packages/centos-linux-release-8.3-1.2011.el8.noarch.rpm
Retrieving http://mirror.centos.org/centos/8.3.2011/BaseOS/x86_64/os/Packages/centos-gpg-keys-8-2.el8.noarch.rpm
Retrieving http://mirror.centos.org/centos/8.3.2011/BaseOS/x86_64/os/Packages/centos-linux-repos-8-2.el8.noarch.rpm
warning: /base/centos-8/var/tmp/rpm-tmp.ISILN2: Header V3 RSA/SHA256 Signature, key ID 8483c65d: NOKEY
error: Failed dependencies:
	centos-repos(8) conflicts with centos-linux-repos-8-2.el8.noarch
	centos-repos(8) conflicts with (installed) centos-linux-repos-8-2.el8.noarch
I was not able to find this error in this forum or over the internet, so I'm writing here hoping someone could help. My expectation is that the command would finish successfully on second (and consecutive) execution(s), because the packages are already installed. What could be the problem?

This is the output with debug information (i.e. -ivvh flags):

Code: Select all

rpm --root=/base/centos-8 -ivvh 'http://mirror.centos.org/centos/8.3.2011/base/x86_64/os/Packages/centos-linux-release-8.3-1.2011.el8.noarch.rpm'    'http://mirror.centos.org/centos/8.3.2011/BaseOS/x86_64/os/Packages/centos-gpg-keys-8-2.el8.noarch.rpm'    'http://mirror.centos.org/centos/8.3.2011/BaseOS/x86_64/os/Packages/centos-linux-repos-8-2.el8.noarch.rpm'
ufdio:       1 reads,    17154 total bytes in 0.000010 secs
ufdio:       1 reads,     5442 total bytes in 0.000002 secs
ufdio:       1 reads,    17154 total bytes in 0.000011 secs
Retrieving http://mirror.centos.org/centos/8.3.2011/BaseOS/x86_64/os/Packages/centos-linux-release-8.3-1.2011.el8.noarch.rpm
Retrieving http://mirror.centos.org/centos/8.3.2011/BaseOS/x86_64/os/Packages/centos-gpg-keys-8-2.el8.noarch.rpm
Retrieving http://mirror.centos.org/centos/8.3.2011/BaseOS/x86_64/os/Packages/centos-linux-repos-8-2.el8.noarch.rpm
D: ============== /base/centos-8/var/tmp/rpm-tmp.Ho89TX
D: loading keyring from pubkeys in /base/centos-8/var/lib/rpm/pubkeys/*.key
D: couldn't find any keys in /base/centos-8/var/lib/rpm/pubkeys/*.key
D: loading keyring from rpmdb
D: opening  db environment /base/centos-8/var/lib/rpm cdb:0x401
D: opening  db index       /base/centos-8/var/lib/rpm/Packages 0x400 mode=0x0
D: locked   db index       /base/centos-8/var/lib/rpm/Packages
D: opening  db index       /base/centos-8/var/lib/rpm/Name 0x400 mode=0x0
D:  read h#       4 
Header SHA1 digest: OK
D: added key gpg-pubkey-8483c65d-5ccc5b19 to keyring
D:  read h#     195 
Header SHA1 digest: OK
D: added key gpg-pubkey-2f86d6a1-5cf7cefb to keyring
D: Using legacy gpg-pubkey(s) from rpmdb
D: /base/centos-8/var/tmp/rpm-tmp.Ho89TX: Header V3 RSA/SHA256 Signature, key ID 8483c65d: OK
D: /base/centos-8/var/tmp/rpm-tmp.Ho89TX: Header SHA256 digest: OK
D: /base/centos-8/var/tmp/rpm-tmp.Ho89TX: Header SHA1 digest: OK
ufdio:       6 reads,    12056 total bytes in 0.000014 secs
D: Plugin: calling hook init in systemd_inhibit plugin
D: 	added binary package [0]
D: ============== /base/centos-8/var/tmp/rpm-tmp.Hv5dDq
D: /base/centos-8/var/tmp/rpm-tmp.Hv5dDq: Header V3 RSA/SHA256 Signature, key ID 8483c65d: OK
D: /base/centos-8/var/tmp/rpm-tmp.Hv5dDq: Header SHA256 digest: OK
D: /base/centos-8/var/tmp/rpm-tmp.Hv5dDq: Header SHA1 digest: OK
ufdio:       6 reads,     9476 total bytes in 0.000012 secs
D: 	added binary package [1]
D: ============== /base/centos-8/var/tmp/rpm-tmp.LP4PCT
D: /base/centos-8/var/tmp/rpm-tmp.LP4PCT: Header V3 RSA/SHA256 Signature, key ID 8483c65d: OK
D: /base/centos-8/var/tmp/rpm-tmp.LP4PCT: Header SHA256 digest: OK
D: /base/centos-8/var/tmp/rpm-tmp.LP4PCT: Header SHA1 digest: OK
ufdio:       6 reads,    11684 total bytes in 0.000014 secs
D: 	added binary package [2]
D: found 0 source and 3 binary packages
D: opening  db index       /base/centos-8/var/lib/rpm/Conflictname 0x400 mode=0x0
D: opening  db index       /base/centos-8/var/lib/rpm/Requirename 0x400 mode=0x0
D: ========== +++ centos-linux-release-8.3-1.2011.el8 noarch/linux 0x0
D:  Requires: centos-repos(8)                               YES (added provide)
D:  Requires: config(centos-linux-release) = 8.3-1.2011.el8 YES (added provide)
D:  Requires: rpmlib(CompressedFileNames) <= 3.0.4-1        YES (rpmlib provides)
D:  Requires: rpmlib(FileDigests) <= 4.6.0-1                YES (rpmlib provides)
D:  Requires: rpmlib(PayloadFilesHavePrefix) <= 4.0-1       YES (rpmlib provides)
D:  Requires: rpmlib(PayloadIsXz) <= 5.2-1                  YES (rpmlib provides)
D: Obsoletes: centos-release < 8.2-3                        NO  
D: Obsoletes: centos-repos < 8.2-3                          NO  
D: Obsoletes: centos-userland-release < 8.2-3               NO  
D:  read h#       1 
Header V3 RSA/SHA256 Signature, key ID 8483c65d: OK
Header SHA256 digest: OK
Header SHA1 digest: OK
D: opening  db index       /base/centos-8/var/lib/rpm/Providename 0x400 mode=0x0
D:  read h#       3 
Header V3 RSA/SHA256 Signature, key ID 8483c65d: OK
Header SHA256 digest: OK
Header SHA1 digest: OK
D: Conflicts: centos-release < 8.0-0.1905.0.10              NO  
D:  read h#       2 
Header V3 RSA/SHA256 Signature, key ID 8483c65d: OK
Header SHA256 digest: OK
Header SHA1 digest: OK
D: Conflicts: centos-release < 8.0-0.1905.0.10              NO  (cached)
D: Conflicts: centos-release < 8.0-0.1905.0.10              NO  
D: opening  db index       /base/centos-8/var/lib/rpm/Obsoletename 0x400 mode=0x0
D: ========== +++ centos-gpg-keys-1:8-2.el8 noarch/linux 0x0
D:  Requires: rpmlib(CompressedFileNames) <= 3.0.4-1        YES (rpmlib provides)
D:  Requires: rpmlib(FileDigests) <= 4.6.0-1                YES (rpmlib provides)
D:  Requires: rpmlib(PayloadFilesHavePrefix) <= 4.0-1       YES (rpmlib provides)
D:  Requires: rpmlib(PayloadIsXz) <= 5.2-1                  YES (rpmlib provides)
D: Conflicts: centos-release < 8.0-0.1905.0.10              NO  (cached)
D: Conflicts: centos-release < 8.0-0.1905.0.10              NO  
D: ========== +++ centos-linux-repos-8-2.el8 noarch/linux 0x0
D:  Requires: centos-gpg-keys = 1:8-2.el8                   YES (added provide)
D:  Requires: config(centos-linux-repos) = 8-2.el8          YES (added provide)
D:  Requires: rpmlib(CompressedFileNames) <= 3.0.4-1        YES (rpmlib provides)
D:  Requires: rpmlib(FileDigests) <= 4.6.0-1                YES (rpmlib provides)
D:  Requires: rpmlib(PayloadFilesHavePrefix) <= 4.0-1       YES (rpmlib provides)
D:  Requires: rpmlib(PayloadIsXz) <= 5.2-1                  YES (rpmlib provides)
D:  Requires: system-release(releasever) = 8                YES (added provide)
D: Conflicts: centos-release < 8.0-0.1905.0.10              NO  (cached)
D: Conflicts: centos-release < 8.0-0.1905.0.10              NO  
D: Conflicts: centos-repos < 8.2-3                          NO  
D: Conflicts: centos-repos(8)                               YES (db provides)
D: Conflicts: centos-repos(8)                               YES (added provide)
error: Failed dependencies:
	centos-repos(8) conflicts with centos-linux-repos-8-2.el8.noarch
	centos-repos(8) conflicts with (installed) centos-linux-repos-8-2.el8.noarch
D: closed   db index       /base/centos-8/var/lib/rpm/Packages
D: closed   db index       /base/centos-8/var/lib/rpm/Obsoletename
D: closed   db index       /base/centos-8/var/lib/rpm/Conflictname
D: closed   db index       /base/centos-8/var/lib/rpm/Providename
D: closed   db index       /base/centos-8/var/lib/rpm/Requirename
D: closed   db index       /base/centos-8/var/lib/rpm/Name
D: closed   db environment /base/centos-8/var/lib/rpm
D: removed  db environment /base/centos-8/var/lib/rpm
D: Exit status: 3
There is no package centos-repos installed. This was the name of the package in CentOS 8, but I'm doing a clean install of 8.3.

Thanks in advance for any help solving this.

P.S. I was using the same approach (consecutive executions of rpm -i), but with the following command line in CentOS 8.2 without any such problems. I recently changed only package names as previously I was using CentOS 8.2 for the chroot environment.

Code: Select all

rpm --root=/baseos/centos-8 \
    -ivh \
    'http://mirror.centos.org/centos/8.2.2004/BaseOS/x86_64/os/Packages/centos-release-8.2-2.2004.0.1.el8.x86_64.rpm' \
    'http://mirror.centos.org/centos/8.2.2004/BaseOS/x86_64/os/Packages/centos-gpg-keys-8.2-2.2004.0.1.el8.noarch.rpm' \
    'http://mirror.centos.org/centos/8.2.2004/BaseOS/x86_64/os/Packages/centos-repos-8.2-2.2004.0.1.el8.x86_64.rpm'

gdsotirov
Posts: 4
Joined: 2021/01/14 09:14:41

Re: CentOS 8.3.2011 rpm install error 'centos-repos(8) conflicts with centos-linux-repos-8-2.el8.noarch'

Post by gdsotirov » 2021/01/15 12:27:20

Replaying to my thread since nobody else did.

The problem is reproducible in CentOS 8.3.2011 even without the --root flag:

Code: Select all

rpm -ivh \
>     'http://mirror.centos.org/centos/8.3.2011/BaseOS/x86_64/os/Packages/centos-linux-release-8.3-1.2011.el8.noarch.rpm' \
>     'http://mirror.centos.org/centos/8.3.2011/BaseOS/x86_64/os/Packages/centos-gpg-keys-8-2.el8.noarch.rpm' \
>     'http://mirror.centos.org/centos/8.3.2011/BaseOS/x86_64/os/Packages/centos-linux-repos-8-2.el8.noarch.rpm'
Retrieving http://mirror.centos.org/centos/8.3.2011/BaseOS/x86_64/os/Packages/centos-linux-release-8.3-1.2011.el8.noarch.rpm
Retrieving http://mirror.centos.org/centos/8.3.2011/BaseOS/x86_64/os/Packages/centos-gpg-keys-8-2.el8.noarch.rpm
Retrieving http://mirror.centos.org/centos/8.3.2011/BaseOS/x86_64/os/Packages/centos-linux-repos-8-2.el8.noarch.rpm
error: Failed dependencies:
	centos-repos(8) conflicts with centos-linux-repos-8-2.el8.noarch
	centos-repos(8) conflicts with (installed) centos-linux-repos-8-2.el8.noarch
So I had to workaround it by adding --nodeps falg and also ignoring the command output as it's still non-zero (3):

Code: Select all

# rpm -ivh --nodeps \
>     'http://mirror.centos.org/centos/8.3.2011/BaseOS/x86_64/os/Packages/centos-linux-release-8.3-1.2011.el8.noarch.rpm' \
>     'http://mirror.centos.org/centos/8.3.2011/BaseOS/x86_64/os/Packages/centos-gpg-keys-8-2.el8.noarch.rpm' \
>     'http://mirror.centos.org/centos/8.3.2011/BaseOS/x86_64/os/Packages/centos-linux-repos-8-2.el8.noarch.rpm'
Retrieving http://mirror.centos.org/centos/8.3.2011/BaseOS/x86_64/os/Packages/centos-linux-release-8.3-1.2011.el8.noarch.rpm
Retrieving http://mirror.centos.org/centos/8.3.2011/BaseOS/x86_64/os/Packages/centos-gpg-keys-8-2.el8.noarch.rpm
Retrieving http://mirror.centos.org/centos/8.3.2011/BaseOS/x86_64/os/Packages/centos-linux-repos-8-2.el8.noarch.rpm
Verifying...                          ################################# [100%]
Preparing...                          ################################# [100%]
	package centos-gpg-keys-1:8-2.el8.noarch is already installed
	package centos-linux-repos-8-2.el8.noarch is already installed
	package centos-linux-release-8.3-1.2011.el8.noarch is already installed
# echo $?
3
I hope someone is able to explain it.

P.S. The problem is not reproducible in CentOS 8.2.2004.

sml
Posts: 221
Joined: 2020/01/17 09:01:44

Re: CentOS 8.3.2011 rpm install error 'centos-repos(8) conflicts with centos-linux-repos-8-2.el8.noarch'

Post by sml » 2021/01/15 13:44:08

In CentOS 8.3, centos-release and centos-repos were renamed centos-linux-release resp. centos-linux-repos.

Code: Select all

rpm -q --obsoletes centos-linux-release
centos-release < 8.2-3
centos-repos < 8.2-3
centos-userland-release < 8.2-3
When you install with dnf, the option obsoletes is enabled by default, so you won't run into this.

gdsotirov
Posts: 4
Joined: 2021/01/14 09:14:41

Re: CentOS 8.3.2011 rpm install error 'centos-repos(8) conflicts with centos-linux-repos-8-2.el8.noarch'

Post by gdsotirov » 2021/01/18 08:40:25

sml wrote:
2021/01/15 13:44:08
In CentOS 8.3, centos-release and centos-repos were renamed centos-linux-release resp. centos-linux-repos.
Yes, they were for the reasons I'm not aware of. I'm not sure why was this necessary.
sml wrote:
2021/01/15 13:44:08
When you install with dnf, the option obsoletes is enabled by default, so you won't run into this.
Do you mean using dnf, instead of rpm sml? Like this:

Code: Select all

dnf --installroot=/base/centos-8 \
    install \
    'http://mirror.centos.org/centos/8.3.2011/BaseOS/x86_64/os/Packages/centos-linux-release-8.3-1.2011.el8.noarch.rpm' \
    'http://mirror.centos.org/centos/8.3.2011/BaseOS/x86_64/os/Packages/centos-gpg-keys-8-2.el8.noarch.rpm' \
    'http://mirror.centos.org/centos/8.3.2011/BaseOS/x86_64/os/Packages/centos-linux-repos-8-2.el8.noarch.rpm'
Because it works as the following output shows:

Code: Select all

CentOS Linux 8 - AppStream                                                                                                                          21 MB/s | 6.3 MB     00:00    
CentOS Linux 8 - BaseOS                                                                                                                            9.0 MB/s | 2.3 MB     00:00    
CentOS Linux 8 - Extras                                                                                                                             61 kB/s | 8.6 kB     00:00    
centos-linux-release-8.3-1.2011.el8.noarch.rpm                                                                                                     166 kB/s |  22 kB     00:00    
centos-gpg-keys-8-2.el8.noarch.rpm                                                                                                                 142 kB/s |  12 kB     00:00    
centos-linux-repos-8-2.el8.noarch.rpm                                                                                                              151 kB/s |  20 kB     00:00    
Package centos-linux-release-8.3-1.2011.el8.noarch is already installed.
Package centos-gpg-keys-1:8-2.el8.noarch is already installed.
Package centos-linux-repos-8-2.el8.noarch is already installed.
Dependencies resolved.
Nothing to do.
Complete!
However, I wonder is there any way to emulate the same with rpm? As far as I'm aware option --obsoletes in rpm could be used only for repo queries.

sml
Posts: 221
Joined: 2020/01/17 09:01:44

Re: CentOS 8.3.2011 rpm install error 'centos-repos(8) conflicts with centos-linux-repos-8-2.el8.noarch'

Post by sml » 2021/01/18 10:29:17

This is my understanding as well. You cannot use --obsoletes together with install in rpm.

gdsotirov
Posts: 4
Joined: 2021/01/14 09:14:41

Re: CentOS 8.3.2011 rpm install error 'centos-repos(8) conflicts with centos-linux-repos-8-2.el8.noarch'

Post by gdsotirov » 2021/01/18 11:47:56

Thanks. I rewrote the command for install of the packages with DNF.

Post Reply

Return to “CentOS 8 - General Support”