1

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
4
  • 3
    The switch mentioned in the error message is -f, --fix-broken. It should correct the broken dependencies for you, if possible. Have you give it a try? Where is the psa-php5-configurator package from (it's not from Wheezy) and what are its dependencies? Could you include your /etc/apt/sources.list? Mar 28, 2015 at 20:41
  • What does it mean, it will correct the broken dependency? Will it install php5-mysql? If it will, then the rest of my software will not work correctly. The thing is, php5-mysqlnd works fine even with the psa-php5-configurator package. psa-php5-configurator just doesnt know that and still wants the php5-mysql package to be installed. Mar 29, 2015 at 7:48
  • This problem is caused by Plesk 12, which does not support mysqlnd. "Fixing" this would be an ugly hack instead of real solution. Mar 29, 2015 at 8:05
  • yes it does not support mysqlnd officially, but it still works with it and since our other software only works with mysqlnd we went ahead installed it and plesk still continous to work. what would the real solution be? to install mysql and remove mysqlnd? our other software would break. so what is the hack you are proposing? Mar 29, 2015 at 8:12

2 Answers 2

2

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.

6
  • thank you for your answer, does it mean, i will have to reinstall plesk and will i lose my custumization and configs in that process? is there really no other option for exampe is there no other way i can tell apt-get to just treat mysqlnd just like it was mysql? what will the apt-get -f command really do? will it try to install mysql and remove mysqlnd? Mar 29, 2015 at 8:27
  • If this is the only conflicting package on Plesk, you should be able to use their apt source on autoinstall.plesk.com with the rest and just modify this package. After the dependency issue is handled, you should not have that error anymore. -f would probably suggest removing either Plesk or php5-mysqlnd and everything that depends on it. As it is clear that you want them both, it is not an option. Mar 29, 2015 at 8:32
  • because I dont do this everyday and since its a production server and dont want anything to go wrong let me go through the steps with you. I will download autoinstall.plesk.com/PSA_12.0.18/dist-deb-Debian-7.0-x86_64/… then I will extract it with dpkg-deb (why the 2 commands?), repack it and install it. do i do not need to remove psa-php5-configurator before doing all this, right? this will just overwrite the previous installed package, right? Mar 29, 2015 at 8:44
  • I suggest installing a similar test environment with the same situation. It won't take long to install Debian VM (e.g. on VMware Player), install PHP with mysqldn, add Plesk to apt sources list and end up with the same error. Take a snapshot at this point and then try to fix it. Don't try it blind on production just because I told you so. :) Mar 29, 2015 at 8:52
  • okay sounds good, i will do as you told me. adding plesk to apt sources should yield the same error without actually having to install plesk, right? how would i add the sources to apt? could you help me one more time here? thanks in advance Mar 29, 2015 at 9:19
0

if we believe functionality of php5mysql is superseded, and system will run without the package, we can create a dummy package providing that package name. equivs is a tool generating such a package.

install equivs. the documentation is brief, and the usage is straightforward. we write a configuration file. we can start with a sample template configuration file.

equivs-control /dev/stdout > f

then edit file f. we can leave most portion untouched, but do modify the "Package:" line with

"Package: php5-mysql"

and build the package according to the configuration file.

equivs-build f

this produce in the working directory

php5-mysql_<version>_<architecture>.deb

where version and architecture are defined in the configuration file, and default to "1.0" and "all", respectively. the package contains nothing. install the package. apt is satisfied when other packages depend on php5mysql.

2
  • While this correctly explains how to use equivs, this is not a usecase for it. The software will need the MySQL extension and one should analyze why the original package does not install.
    – zhenech
    Mar 29, 2015 at 7:27
  • is there a way without equivs? it has too many dependencies with other packages, and apt-get doesnt let me do anything before i fix the dependency which i mentioned at the beginning Mar 29, 2015 at 7:57

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .