Error: Failed dependencies:mariadb-libs is obsoleted by mysql-community-libs-8.0.35-1.el7.x86_64

While installing MySQL through rpm packages, you can encounter the below error while installing mysql-community-libs packages :

Error 1 :


[root@vm3 mysql1]# rpm -ivh mysql-community-libs-8.0.35-1.el7.x86_64.rpm
warning: mysql-community-libs-8.0.35-1.el7.x86_64.rpm: Header V4 RSA/SHA256 Signature, key ID 3a79bd29: NOKEY
error: Failed dependencies:
	mariadb-libs is obsoleted by mysql-community-libs-8.0.35-1.el7.x86_64
	

Error 2 :

[root@vm3 mysql1]# rpm -ivh mysql-community-libs-compat-8.0.35-1.el7.x86_64.rpm
warning: mysql-community-libs-compat-8.0.35-1.el7.x86_64.rpm: Header V4 RSA/SHA256 Signature, key ID 3a79bd29: NOKEY
error: Failed dependencies:
	mysql-community-libs(x86-64) >= 8.0.11 is needed by mysql-community-libs-compat-8.0.35-1.el7.x86_64
	mariadb-libs is obsoleted by mysql-community-libs-compat-8.0.35-1.el7.x86_64
	

Solution: Execute the below command .

yum remove mysql-libs

[root@vm3 mysql1]# yum remove mysql-libs
Loaded plugins: langpacks, ulninfo
Resolving Dependencies
--> Running transaction check
---> Package mariadb-libs.x86_64 1:5.5.60-1.el7_5 will be erased
--> Processing Dependency: libmysqlclient.so.18()(64bit) for package: 2:postfix-2.10.1-7.el7.x86_64
--> Processing Dependency: libmysqlclient.so.18(libmysqlclient_18)(64bit) for package: 2:postfix-2.10.1-7.el7.x86_64
--> Running transaction check
---> Package postfix.x86_64 2:2.10.1-7.el7 will be erased
--> Finished Dependency Resolution
https://yum.oracle.com/repo/OracleLinux/OL7/UEKR4/x86_64/repodata/repomd.xml: [Errno 14] curl#6 - "Could not resolve host: yum.oracle.com; Unknown error"
Trying other mirror.
https://yum.oracle.com/repo/OracleLinux/OL7/latest/x86_64/repodata/repomd.xml: [Errno 14] curl#6 - "Could not resolve host: yum.oracle.com; Unknown error"
Trying other mirror.

Dependencies Resolved

=================================================================================================
 Package                Arch             Version                     Repository             Size
=================================================================================================
Removing:
 mariadb-libs           x86_64           1:5.5.60-1.el7_5            @ol7_latest           4.4 M
Removing for dependencies:
 postfix                x86_64           2:2.10.1-7.el7              @ol7_latest            12 M

Transaction Summary
=================================================================================================
Remove  1 Package (+1 Dependent package)

Installed size: 17 M
Is this ok [y/N]: y
Downloading packages:
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Warning: RPMDB altered outside of yum.
  Erasing    : 2:postfix-2.10.1-7.el7.x86_64                                                 1/2 
  Erasing    : 1:mariadb-libs-5.5.60-1.el7_5.x86_64                                          2/2 
  Verifying  : 2:postfix-2.10.1-7.el7.x86_64                                                 1/2 
  Verifying  : 1:mariadb-libs-5.5.60-1.el7_5.x86_64                                          2/2 

Removed:
  mariadb-libs.x86_64 1:5.5.60-1.el7_5                                                           

Dependency Removed:
  postfix.x86_64 2:2.10.1-7.el7                                                                  

Complete!

Result: Now install the package again. It will go through successfully

[root@vm3 mysql1]# rpm -ivh mysql-community-libs-8.0.35-1.el7.x86_64.rpm
warning: mysql-community-libs-8.0.35-1.el7.x86_64.rpm: Header V4 RSA/SHA256 Signature, key ID 3a79bd29: NOKEY
Preparing… ################################# [100%]
Updating/installing…
1:mysql-community-libs-8.0.35-1.el7################################# [100%]
[root@vm3 mysql1]# rpm -ivh mysql-community-libs-compat-8.0.35-1.el7.x86_64.rpm
warning: mysql-community-libs-compat-8.0.35-1.el7.x86_64.rpm: Header V4 RSA/SHA256 Signature, key ID 3a79bd29: NOKEY
Preparing… ################################# [100%]
Updating/installing…

Note: For Installing MySQL you can go through the article: MySQL installation in Linux through RPM packages.

Leave a Reply