I have installed PHP on Ubuntu 22.04 using the command: apt-get install php libapache2-mod-php
When I tried to install a Composer package, I got a message saying
The zip extension and unzip command are both missing, skipping
I took the advice of the top answer to an SO question (PHP error: "The zip extension and unzip command are both missing, skipping.") and ran: apt install zip unzip php-zip
. The result of that is shown below:
ubuntu@ip<..>:/var/www/html$ sudo apt install zip unzip php-zip
Reading package lists... Done
Building dependency tree... Done
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:
php8.1-zip : Depends: php8.1-common (= 8.1.2-1ubuntu2.2) but 8.1.2-1ubuntu2.3 is to be installed
E: Unable to correct problems, you have held broken packages.
ubuntu@ip-<...>:/var/www/html$ php -v
PHP 8.1.2 (cli) (built: Aug 15 2022 12:24:10) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.1.2, Copyright (c) Zend Technologies
with Zend OPcache v8.1.2, Copyright (c), by Zend Technologies
ubuntu@ip-<...>:/var/www/html$
I really have no idea how to react to this. Is there some way I can install php-zip without these dependency related problems?