We have just come across a problem which was preventing a customer from installing php7.2-zip on Ubuntu 18.04 LTS.
Whenever they tried to install it via apt. it would bomb out with;
root@lamp ~ # apt install php7.2-zip php7.2-common
Reading package lists... Done
Building dependency tree
Reading state information... Done
php7.2-common is already the newest version (7.2.10-0ubuntu0.18.04.1).
php7.2-common set to manually installed.
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.2-zip : Depends: php7.2-common (= 7.2.3-1ubuntu1) but 7.2.10-0ubuntu0.18.04.1 is to be installed
E: Unable to correct problems, you have held broken packages.
This was caused by the server missing a repo in its sources.list. Add in the security universe repo and it will install normally
The following solution fixes the issue;
echo "deb http://security.ubuntu.com/ubuntu bionic-security main universe" >> /etc/apt/sources.list
apt update
apt install php7.2-zip