18.04 server - unable to locate package redis-server [duplicate]

I installed a fresh install of 18.04 server. The package redis-server does not seem to be installable. I'm not sure why:

$ sudo apt install redis-server
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package redis-server

the package doesnt appear to exist:

$ sudo apt-cache search redis
miscfiles - Dictionaries and other interesting files
python-redis - Persistent key-value database with network interface (Python library)
resource-agents - Cluster Resource Agents

I have run apt update. I'm guessing its missing a repository of packages, but since this is a fresh install, I'm not sure why it would be missing one, or how to fix it.

root@:/etc/newrelic# sudo apt-get install nri-redis
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package nri-redis
2

2 Answers

As a commenter noted, the universe package was not enabled. Enabling with add-apt-repository did the trick:

sudo add-apt-repository universe

1

I had the same issue on "Ubuntu 18.04 LTS on Windows 10" and accepted answer doesn't work for me but this answer worked. It might help someone else.

sudo add-apt-repository "deb $(lsb_release -sc) universe"
3

You Might Also Like