Question

Unable to install php7.3-zip

I’m trying to install php7.3-zip with the following commands:

sudo apt install software-properties-common
sudo add-apt-repository universe
sudo add-apt-repository ppa:ondrej/php
sudo apt update
sudo apt-get install php7.3-zip

But I get the following error:

E: Unable to locate package php7.3-zip
E: Couldn't find any package by glob 'php7.3-zip'
E: Couldn't find any package by regex 'php7.3-zip'

Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

Hi there @italoguerrieri,

I tested this at my end and it seems to be working as normal on Ubuntu 18.04:

  1. apt search php7.3-zip

Output:

Sorting... Done
Full Text Search... Done
php7.3-zip/bionic 7.3.15-3+ubuntu18.04.1+deb.sury.org+1 amd64
  Zip module for PHP

When you run the apt update command do you get any errors?

Also, what is the exact Ubuntu version that you are currently using? You can check that with this command for example:

  1. cat /etc/os-release

Regards, Bobby

Hi @bobbyiliev,

this was the content of my /etc/apt/sources.list.d/:

## Note, this file is written by cloud-init on first boot of an instance
## modifications made here will not survive a re-bundle.
## if you wish to make changes you can:
## a.) add 'apt_preserve_sources_list: true' to /etc/cloud/cloud.cfg
##     or do the same in user-data
## b.) add sources in /etc/apt/sources.list.d
## c.) make changes to template file /etc/cloud/templates/sources.list.tmpl

# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.
deb http://mirrors.digitalocean.com/ubuntu/ disco main restricted
# deb-src http://mirrors.digitalocean.com/ubuntu/ disco main restricted

## Major bug fix updates produced after the final release of the
## distribution.
deb http://mirrors.digitalocean.com/ubuntu/ disco-updates main restricted
# deb-src http://mirrors.digitalocean.com/ubuntu/ disco-updates main restricted

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team. Also, please note that software in universe WILL NOT receive any
## review or updates from the Ubuntu security team.
deb http://mirrors.digitalocean.com/ubuntu/ disco universe
# deb-src http://mirrors.digitalocean.com/ubuntu/ disco universe
deb http://mirrors.digitalocean.com/ubuntu/ disco-updates universe
# deb-src http://mirrors.digitalocean.com/ubuntu/ disco-updates universe

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team, and may not be under a free licence. Please satisfy yourself as to
## your rights to use the software. Also, please note that software in
## multiverse WILL NOT receive any review or updates from the Ubuntu
## security team.
deb http://mirrors.digitalocean.com/ubuntu/ disco multiverse
# deb-src http://mirrors.digitalocean.com/ubuntu/ disco multiverse
deb http://mirrors.digitalocean.com/ubuntu/ disco-updates multiverse
# deb-src http://mirrors.digitalocean.com/ubuntu/ disco-updates multiverse

## N.B. software from this repository may not have been tested as
## extensively as that contained in the main release, although it includes
## newer versions of some applications which may provide useful features.
## Also, please note that software in backports WILL NOT receive any review
## or updates from the Ubuntu security team.
deb http://mirrors.digitalocean.com/ubuntu/ disco-backports main restricted universe multiverse
# deb-src http://mirrors.digitalocean.com/ubuntu/ disco-backports main restricted universe multiverse

## Uncomment the following two lines to add software from Canonical's
## 'partner' repository.
## This software is not part of Ubuntu, but is offered by Canonical and the
## respective vendors as a service to Ubuntu users.
# deb http://archive.canonical.com/ubuntu disco partner
# deb-src http://archive.canonical.com/ubuntu disco partner

deb http://security.ubuntu.com/ubuntu disco-security main restricted
# deb-src http://security.ubuntu.com/ubuntu disco-security main restricted
deb http://security.ubuntu.com/ubuntu disco-security universe
# deb-src http://security.ubuntu.com/ubuntu disco-security universe
deb http://security.ubuntu.com/ubuntu disco-security multiverse
# deb-src http://security.ubuntu.com/ubuntu disco-security multiverse
deb http://archive.ubuntu.com/ubuntu disco universe

I have substituted my sources.list file with your sources.list and this solves the problem.

Thank you very much, Italo

Hi @bobbyiliev,

I have rerun the apt update and this is the result:

~# sudo apt update
Hit:1 http://ppa.launchpad.net/ondrej/apache2/ubuntu disco InRelease
Hit:2 http://security.ubuntu.com/ubuntu disco-security InRelease
Hit:3 http://archive.ubuntu.com/ubuntu disco InRelease
Hit:4 http://ppa.launchpad.net/ondrej/php/ubuntu disco InRelease
Hit:5 https://repos.insights.digitalocean.com/apt/do-agent main InRelease
Hit:6 http://mirrors.digitalocean.com/ubuntu disco InRelease
Hit:7 http://mirrors.digitalocean.com/ubuntu disco-updates InRelease
Get:8 http://mirrors.digitalocean.com/ubuntu disco-backports InRelease [88.8 kB]
Fetched 88.8 kB in 1s (80.9 kB/s)
Reading package lists... Done
Building dependency tree
Reading state information... Done
10 packages can be upgraded. Run 'apt list --upgradable' to see them.

I’m using Ubuntu 19.04:

~# cat /etc/os-release
NAME="Ubuntu"
VERSION="19.04 (Disco Dingo)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 19.04"
VERSION_ID="19.04"
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
VERSION_CODENAME=disco
UBUNTU_CODENAME=disco

Thanks, Italo