Report this

What is the reason for this report?

putty and webmain ( E: Unable to locate package php7-zip)

Posted on June 18, 2021

E: Unable to locate package php7-zip



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!

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.

Hi there,

I believe that the package name should include the exact PHP version that you want to install this for.

For example, if you have PHP 7.4, the package name would be php7.4-zip.

Regards, Bobby

The error E: Unable to locate package php7-zip usually means that the package name you’re trying to install doesn’t exist or isn’t recognized by your package manager. Here are some ways to resolve the issue:

1. Update Package List

First, update your package list to ensure you have the latest information:

sudo apt update

This makes sure that your package manager is aware of the available packages.

2. Correct Package Name

The correct package name for the PHP zip extension will vary depending on your PHP version. The package is typically named php-zip or php<version>-zip. For example:

  • For PHP 7.4:
sudo apt install php7.4-zip

The generic way to install the zip extension is:

sudo apt install php-zip

This command will automatically install the zip extension for the default PHP version installed on your system.

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.