0

i have a wordpress site that uses Duplicator plugin. In order for this plugin to work it needs php7.0-zip

[root@server1:~# apt-get -y install php7.0-zip
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 php7.0-zip : Depends: php7.0-common (= 7.0.33-0+deb9u3) but 7.0.33-5+0~20190309015553.9+stretch~1.gbp4c6517 is to be installed
E: Unable to correct problems, you have held broken packages.
Thomas Ward
  • 74,764
adam
  • 305
  • actually if you read my post again, you will see that php7.0 "IS" installed! (i hope you were not the one who down voted this question?) – adam Mar 24 '19 at 03:01

2 Answers2

1

Since php7.0-common (= 7.0.33-0+deb9u3) is a dependency, as shown by your console, I suggest you install it first before installing php7.0-zip. You can find the Debian package here.

Also, the best approach to get these packages installed is to use package managers such as aptitude or synaptic. You can install any of them and use as follows:

-- aptitude:

sudo apt-get update
sudo apt-get install aptitude
sudo aptitude update
sudo aptitude install php7.0-common php7.0-zip -y

-- synaptic:

sudo apt-get update
sudo apt-get install synaptic

Synaptic has a GUI you can use and in case you can't launch it after installing, see this.

I hope this answer helps you out!

ThunderBird
  • 1,955
  • thank you. this solution essentially sorted my problem. I had to nervously allow aptitude to downgrade my php7.0 so the repository matched...it also removed php7.0-curl and php7.0-gd that were installed using the wrong repository. Once this completed, the downgrade process and install of php7.0-zip appears to have completed successfully. Now i just hope that it shows up in Virtualmin? – adam Mar 24 '19 at 03:04
  • Okay @adam, I see. I'm glad it helped in sorting out your issue. – ThunderBird Mar 26 '19 at 10:34
0

Please try again with the tool "aptitude". It may suggest to also update packages that you did not explicitly list to update, which would be in conflict with the versions you requested. You can then ask for different solutions to be offered wrt what other package should also get to later versions:

apt-get install aptitude
aptitude install php7.0-zip

On my system I have php7.3 and php7.0 available. Maybe you already mixed this up? You may alternatively want to try installing the package php-zip, so you get whatever is current for the distribution you are working with.

smoe
  • 435
  • 2
  • 8
  • ok, so i have installed aptitude and done the following... 'root@server1:~# aptitude install php7.0-zip The following NEW packages will be installed: php7.0-zip{b} The following packages will be REMOVED: php7.0-curl{u} php7.0-gd{u} 0 packages upgraded, 1 newly installed, 2 to remove and 0 not upgraded. Keep the following packages at their current version:
    1. php7.0-zip [Not Installed] '  ....Do i accept this change? I thought i would want it to install this?
      
    – adam Mar 23 '19 at 23:18