0

Every time I'm trying to install something, it shows me an error "unable to locate package xxx"

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

sudo apt-get install testdisk
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package testdisk

$ lsb_release -a
Distributor ID: Ubuntu
Description:    Ubuntu 16.04.4 LTS
Release:        16.04
Codename:       xenial

How can I troubleshoot this issue?

Is that normal...? (Thanks for correcting)

sudo apt update
Reading package lists... Done
Building dependency tree
Reading state information... Done
All packages are up to date.
Hin Mat
  • 9
  • 3
  • 1
    Distributor ID: Ubuntu Description: Ubuntu 16.04.4 LTS Release: 16.04 Codename: xenial – Hin Mat May 02 '18 at 11:54
  • 2
    gddrescue is provided by the universe repository in 16.04. Check that universe is enabled in Software & Updates (Dash -> Software & Updates). – karel May 02 '18 at 11:56
  • The problem is i can't install anything even to update... – Hin Mat May 02 '18 at 11:56
  • 1
    Can you add the output of sudo apt update please? – Byte Commander May 02 '18 at 11:56
  • 2
    The update command doesn't seem to load any package sources. Did you comment/remove/disable any of the software sources? Can you show us the output of grep -r --include '*.list' ^deb /etc/apt/sources.list* ? – Byte Commander May 02 '18 at 12:08

1 Answers1

1

Hint: When you get Unable to Locate Package xxx, goto https://packages.ubuntu.com and search for the package name. You'll find in your case that gddrescue is available under universe. Thus, we need to add it. Try the following:

sudo add-apt-repository universe
sudo apt update
sudo apt install gddrescue
Shubham
  • 275