Debian – apt-get – Depends: php5-thesql but it is not going to be installed

aptdebiandependencies

We needed php5-mysqlnd and thus php5-mysql got removed and now a package has unmet dependencies whenever we want to install something with apt-get.

How or where can I edit the dependencies to get rid of this annoying error msg? Our server works fine right now and I dont want to mess around with something and delete a package by error.

We use Debian 7.7 (wheezy) and apt-get
Thanks for the help in advance.

and here is the output:

 The following packages have unmet dependencies:
     psa-php5-configurator : Depends: php5-mysql but it is not going to be installed
    E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).
    -mysql but it is not going to be installed

Best Answer

This problem is caused by Plesk 12, which does not support mysqlnd. It seems, that it works with mysqldn despite it is not officially supported. It is not recommended to modify these settings on a production environment. It is an ugly hack, but in can be done.

You need to modify the .deb package and remove the conflicting dependency. Get the .deb package and extract it into a temporary directory:

dpkg-deb -x psa-php5-configurator_x.x.x-x_x.deb tmp_dir
dpkg-deb --control psa-php5-configurator_x.x.x-x_x.deb tmp_dir/DEBIAN

Now you can edit the package as you wish and then repack and install it:

dpkg -b tmp_dir psa-php5-configurator_my-ugly-hack.deb
sudo dpkg -i psa-php5-configurator_my-ugly-hack.deb

Please note that as it is an ugly hack, you need to do it again on every Plesk update. Good luck in your chosen path.