By abidalamiir
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!
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:
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.
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:
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.
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.