Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unable to install PHP zip archive with PHP 7.2

I am running into some issues installing the PHP zip archive and not sure how to fix this. I am running Ubuntu 18 with PHP 7.2

The error I receive in terminal is

The following packages have unmet dependencies.
 php7.2-zip : Depends: php7.2-common (= 7.2.5-0ubuntu0.18.04.1) but 7.2.5- 
1+ubuntu17.10.1+deb.sury.org+1 is to be installed
E: Unable to correct problems, you have held broken packages.

Any help would be appreciated, thanks

like image 536
userdrupa4356 Avatar asked Oct 17 '22 17:10

userdrupa4356


2 Answers

I tried changing the repository list with:

http://security.ubuntu.com/ubuntu bionic-security main universe http://archive.ubuntu.com/ubuntu bionic main restricted universe

But none of them seem to work, but I finally found a repository that works running the following command

add-apt-repository ppa:ondrej/php

And then updating and installing normally the package using apt-get

php7.2-zip Installed

As you can see its installed at last.

like image 146
Jonathan Avatar answered Oct 19 '22 06:10

Jonathan


On Ubuntu 18.04, this can happen if your missing the "security.ubuntu.com/ubuntu bionic-security main universe" repo.

Add it to your /etc/apt/sources.list, update and then it will install normally.

echo "deb http://security.ubuntu.com/ubuntu bionic-security main universe" >>  
/etc/apt/sources.list
apt update
apt install php7.2-zip
like image 32
leenix Avatar answered Oct 19 '22 07:10

leenix