Question

Unable to install php7.3-zip

Posted March 14, 2020 2.3k views
Ubuntu 18.04

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'

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.

×
3 answers

Hi there @italoguerrieri,

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

  • 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:

  • cat /etc/os-release

Regards,
Bobby

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

  • Hi there @italoguerrieri,

    That is quite interesting, I’ve set up a fresh new Ubuntu 19.04 Droplet and tried installing PHP 7.3 and PHP 7.3 Zip and it went through as expected with the commands that you’ve shared.

    • apt search php7.3-zip

    Output:

    Sorting... Done
    Full Text Search... Done
    php7.3-zip/eoan,now 7.3.15-3+ubuntu19.10.1+deb.sury.org+1 amd64 [installed]
      Zip module for PHP
    

    Have you added any other specific repositories that could be causing the issue for you?

    Here’s a copy of my current /etc/apt/source.list file:

    ## 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/ eoan main restricted
    # deb-src http://mirrors.digitalocean.com/ubuntu/ eoan main restricted
    
    ## Major bug fix updates produced after the final release of the
    ## distribution.
    deb http://mirrors.digitalocean.com/ubuntu/ eoan-updates main restricted
    # deb-src http://mirrors.digitalocean.com/ubuntu/ eoan-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/ eoan universe
    # deb-src http://mirrors.digitalocean.com/ubuntu/ eoan universe
    deb http://mirrors.digitalocean.com/ubuntu/ eoan-updates universe
    # deb-src http://mirrors.digitalocean.com/ubuntu/ eoan-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/ eoan multiverse
    # deb-src http://mirrors.digitalocean.com/ubuntu/ eoan multiverse
    deb http://mirrors.digitalocean.com/ubuntu/ eoan-updates multiverse
    # deb-src http://mirrors.digitalocean.com/ubuntu/ eoan-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/ eoan-backports main restricted universe multiverse
    # deb-src http://mirrors.digitalocean.com/ubuntu/ eoan-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 eoan partner
    # deb-src http://archive.canonical.com/ubuntu eoan partner
    
    deb http://security.ubuntu.com/ubuntu eoan-security main restricted
    # deb-src http://security.ubuntu.com/ubuntu eoan-security main restricted
    deb http://security.ubuntu.com/ubuntu eoan-security universe
    # deb-src http://security.ubuntu.com/ubuntu eoan-security universe
    deb http://security.ubuntu.com/ubuntu eoan-security multiverse
    deb http://archive.ubuntu.com/ubuntu eoan universe
    # deb-src http://security.ubuntu.com/ubuntu eoan-security multiverse
    

    And in my /etc/apt/sources.list.d/ directory I only have ondrej-ubuntu-php-eoan.list.

    Can you share the contents of yours as well or make sure that there are no other repositories that could be causing the problem.

    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

Submit an Answer