Fix the Package php-mysql is obsoleted by php-mysqlnd Error in Plesk

Fix the Package php-mysql is obsoleted by php-mysqlnd Error in Plesk

When using Plesk web hosting solutions, you may come across this error that reads “Package php-mysql is obsoleted by php-mysqlnd”. Generally, it inhibits Plesk’s ability to update itself automatically.

As you might know, Plesk supports both MySQL and PHP. Therefore, many developers prefer to use these languages to build websites and web apps. Plesk also offers an intuitive web-based interface to set up everything from email accounts to DNS entries. So there’s a high possibility that you may come across this error. It will read something like:

Code:
php-mbstring.x86_64 0:Package php-mysql-5.4.45-14.el7.remi.x86_64 is obsoleted by php-mysqlnd-5.6.33-1.el7.remi.x86_64 which is already installed
Exception: Failed to solve dependencies:

Code:
psa-php5-configurator-1.7.0-cos7.build1705170314.17.x86_64 requires php-mysql
Here are the steps involved in fixing this error:
  • Using SSH, log in to your server
  • Using this command, install the required rpm-build package:
Code:
yum install rpm-build
  • Create a file and name it php-mysql.spec by executing this command:
Code:
touch php-mysql.spec
Open the file and insert the following code in it:

Code:
Summary: The empty php-mysql package
Name: php-mysql
Version: 8.0.0
Release: 1
License: Public
Group: Applications/System
%description
The empty php-mysql package
%filesc
  • Next, build the package you installed earlier using this command:
Code:
rpmbuild -bb php-mysql.spec
  • Lastly, install the package by executing this command:
Code:
rpm -Uvh /root/rpmbuild/RPMS/x86_64/php-mysql-8.0.0-1.x86_64.rpm
Run Plesk upgrade. Now you have installed the necessary package and upgraded Plesk to the latest version.
Author
kumkumsharma
Views
2,355
First release
Last update
Rating
0.00 star(s) 0 ratings

More resources from kumkumsharma

Top