2
E: Unable to locate package repo

this error comes after

sudo apt-get install repo
2

4 Answers 4

3

If you're trying to download AOSP sources using the repo tool on Ubuntu 14.04, the package can't be found (had the same issue).

Google provides instructions to download the tool manually:

To install Repo:

Make sure you have a bin/ directory in your home directory and that it is included in your path:

$ mkdir ~/bin
$ PATH=~/bin:$PATH

Download the Repo tool and ensure that it is executable:

$ curl https://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
$ chmod a+x ~/bin/repo

You should now be able to run repo init ... and repo sync

1
2
sudo apt-get install repo 

means that you tell your system to see if there is a package called repo and install it if it can find it. Since there is no package repo the notice you get is

E: Unable to locate package repo

So this is normal!

2

As Rinzwind explains, there is no package called repo so Ubuntu cannot install it. If you are not sure about the existence of a package, run the following command to check whether it can be found:

apt-cache search [packageName]

In your case that would be apt-cache search repo. In this particular case you will get a great many results because repo is short for repository which is part of many package names.

Feel free to ask another question to get help on what you are more specifically installing.

1
0

Type in your commandline

apt policy | grep universe

If you got no result, you have probably not enabled the Universe packages.
To do so,

  • open software and
  • in the menu Software & Updates
  • enable Community-maintained free and open-source software (universe) .

Afterwards refresh your apt-cache by

sudo apt update

Now you are ready to install repo

sudo apt install repo
1
  • This doesn't help.
    – Danijel
    Sep 15, 2021 at 13:36

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .