I'm running LEMP on a digitalocean droplet. We're running php v 7.2.19 on ubuntu 18.04.1.

I'm trying to install php-zip (apt-get install php7.2-zip) but am getting the error:

apt-get install php7.2-zip Reading package lists... Done Building dependency tree Reading state information... Done E: Unable to locate package php7.2-zip E: Couldn't find any package by glob 'php7.2-zip' E: Couldn't find any package by regex 'php7.2-zip'

I can't figure out why I can't install. Any suggestions?

  • What repos/ mirrors are you using? 17.04 is EOL since 2018-01 – Lenniey Jul 16 '19 at 14:43
  • I'm not sure - sry I'm still learning a lot about this stuff. I booted with the DO one-click setup, which is "LEMP on18.04". Is there a way to check the repos/mirrors? – Aninemity Jul 16 '19 at 14:51
  • You are on 18.04, not 17.04. Try sudo add-apt-repository universe && sudo apt update && sudo apt install php7.2-zip. I assume your apt lists are wrong, check the files and entries in /etc/apt/sources.list and /etc/apt/sources.list.d/ – Lenniey Jul 16 '19 at 14:59
  • that seems to have worked - thanks! I'm testing now but if y ou add an aswer I'll go ahead and accept it – Aninemity Jul 16 '19 at 15:06

The universe repository was missing. Solved by adding it via sudo add-apt-repository universe and then installing php7.2-zip.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.