3

This question already has an answer here:

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

marked as duplicate by karel, Elder Geek, Kulfy, Eliah Kagan, vidarlo Jul 24 at 11:24

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

3

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 to run:sudo apt-get update first – Craig Poole Aug 14 at 11:14
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 http://archive.ubuntu.com/ubuntu $(lsb_release -sc) universe"
  • 1
    The question is not about Ubuntu on Windows. – fkraiem Jul 21 at 14:42
  • But I had the same issue. It's eventually Ubuntu. I regret mentioning Windows 10. You are so kind, thank you – boyukbas Jul 21 at 14:44
  • @fkraiem Ubuntu WSL and Ubuntu OS uses same repositories for packages. – Kulfy Jul 21 at 18:46

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