0

I am trying to install php5-mysqlnd on a fresh install of Wheezy (/etc/debian_version refers to it as wheezy/sid) and I'm having a problem:

root@debian:/var/www/lottery1# apt-get install php5-mysqlnd
Reading package lists... Done
Building dependency tree       
Reading state information... Done
php5-mysqlnd is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue [Y/n]? Y
Setting up php5-mysqlnd (5.4.0-3) ...
ucfr: Attempt from package php5-mysqlnd  to take /etc/php5/mods-available/mysql.ini away from package php5-mysql
ucfr: Aborting.
dpkg: error processing php5-mysqlnd (--configure):
 subprocess installed post-installation script returned error exit status 4
Processing triggers for libapache2-mod-php5 ...
configured to not write apport reports
                                      Reloading web server config: apache2.
Errors were encountered while processing:
 php5-mysqlnd
E: Sub-process /usr/bin/dpkg returned an error code (1)

It seems there is some sort of conflict with the php5-mysql package, but I still get this error even after removing (with --purge) the php5-mysql package.

Any thoughts? I'm trying to run a web tool that makes heavy use of mysqli_result::fetch_all().

Thanks!

1 Answer 1

1

So after removing php5-mysql, I had to forcefully remove php5-mysqlnd, then I had to purge php5-mysql, then I had to purge php5-mysqlnd, then I could install php5-mysqlnd.

dpkg --remove --force-remove-reinstreq php5-mysqlnd
dpkg --purge php5-mysql 
dpkg --purge php5-mysqlnd 

Only once dpkg -l | grep php5-mysql had no output, could I apt-get install php5-mysqlnd and have it work.

2
  • I was having similar errors, and had to to remove php5-fpm package before running your instructions, must have been some kind of conflict.
    – littleguy
    Jul 5, 2012 at 12:31
  • I was having similar errors after upgrading php on the server: The following packages have unmet dependencies: php5-mysql : Conflicts: php5-mysqlnd but 5.5.24+dfsg-1+deb.sury.org~precise+1 is to be installed php5-mysqlnd : Conflicts: php5-mysql but 5.5.24+dfsg-1+deb.sury.org~precise+1 is to be installed E: Unable to correct problems, you have held broken packages. So I remove both packages & reinstalled them - that solved it for me.
    – Jadeye
    May 8, 2015 at 12:28

You must log in to answer this question.

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