Report this

What is the reason for this report?

Unable to install Nginx on Ubuntu 21.10

Posted on August 15, 2022

I run sudo apt install nginx but I get

Reading package lists… Done Building dependency tree… Done Reading state information… Done E: Unable to locate package nginx



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 @biglightcyanmantaray,

Before trying to install Nginx, update your Droplet like so:

  1. apt update
  2. apt upgrade

then try again. By doing an update you’ll update your apt cache which should help with the problem.

Hope that helps!

Hello @biglightcyanmantaray

Nginx is available in Ubuntu’s default repositories, it is possible to install it from these repositories using the apt packaging system.

You can make sure that you’ve enabled all Ubuntu repositories

  1. sudo add-apt-repository main
  2. sudo add-apt-repository universe
  3. sudo add-apt-repository restricted
  4. sudo add-apt-repository multiverse

and then execute the install command one more time.

However, if you’re still facing issues get back here on this thread and we’ll look into it.

Regards

Unable to locate package ngnix

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.