I'm getting this error when running sudo apt-get install php7.4-zip
:
The following packages have unmet dependencies: php7.4-zip : Depends: php7.4-common (= 7.4.3-4ubuntu2.12) but 7.4.10-1 ubuntu18.04.1 deb.sury.org 1 is to be installed E: Unable to correct problems, you have held broken packages.
The PHP manual page for installing the Zip extension says this:
As of PHP 7.4.0, in order to use these functions you must compile PHP with zip support by using the --with-zip configure option. Previously, zip support had to be enabled by using the --enable-zip configure option. As of PHP 7.4.0, the bundled libzip is removed.
What is the straightforward method for getting the Zip extension installed on my system?
UPDATE: Additional information:
dpkg --get-selections | grep hold
returns no held packages.sudo apt autoremove
removed some packages but did not change the message returned bysudo apt install php7.4-zip
CodePudding user response:
try this:
sudo apt-get install -y php7.4-cli php7.4-json php7.4-common php7.4-mysql php7.4-zip php7.4-gd php7.4-mbstring php7.4-curl php7.4-xml php7.4-bcmath
CodePudding user response:
Try apt-search for repo is exists for php7.4-zip
apt search php7.4-zip
If repos is exists
apt install php7.4-zip
Or you can use wildcard
apt install php*zip