How do I get to the Universe Repository in supported versions of Ubuntu?
-
Related: “Unable to locate package” while trying to install packages with APT– Eliah KaganCommented Nov 25, 2019 at 10:52
-
it showed me error on aws ububtu standard , but managed to fixed it ike this - add-apt-repository universe - apt update - apt-get install -y curl jq python3-pydot graphviz– Harry SarshoghCommented Sep 29, 2020 at 9:04
5 Answers
If you want in one command and not use Software source ticking then in terminal put:
sudo add-apt-repository universe
On older versions of Ubuntu, you might have to use a full source line:
sudo add-apt-repository "deb http://archive.ubuntu.com/ubuntu $(lsb_release -sc) universe"
To enable all Ubuntu software (main universe restricted multiverse
) repositories use
sudo add-apt-repository "deb http://archive.ubuntu.com/ubuntu $(lsb_release -sc) main universe restricted multiverse"
you can add also partner
repository with different link (see difference is ubuntu to canonical)
sudo add-apt-repository "deb http://archive.canonical.com/ubuntu $(lsb_release -sc) partner"
Then update the package list:
sudo apt-get update
p.s.
$(lsb_release -sc)
checks your Ubuntu version and puts its name in the source link. Since 12.04 is called precise
, you can test in a terminal that lsb_release -sc
gives precise
. That adds the precise name of your Ubuntu release in Software sources. Wrong word and nothing will work.
For all differences in repositories read https://help.ubuntu.com/community/Repositories/Ubuntu
-
8Just a note that you may have to run
sudo apt-get update
before you can install the package you wanted.– ty01Commented Nov 21, 2013 at 19:17 -
Debian doesn't always come with lsb_release installed, but if you have it you can use a similar syntax with their mirror URLs. Commented Dec 22, 2020 at 13:10
-
1
First, open software center. Click on 'edit' and then 'software sources' to open the software sources window. Once that is open, check the box that says, "Community-maintained free and open-source software (universe)."
Now, all the universe packages should show up in software center just like all the other ones.
More information:
-
In my case ( on Ubuntu 16.04 LTS) This option was already checked. So i have just unchecked it and then checked it again. Click on "revert" and then software cache will update. And then i was able to install stable chrome using ubuntu software installer with stable debian page. Thanks @user69469 :)) Strang!! isn't it? Commented May 29, 2017 at 16:01
Command Line Way of enabling Ubuntu software Repositories For 12.10 and above:
To enable main repository,
sudo add-apt-repository main
To enable universe repository,
sudo add-apt-repository universe
To enable multiverse repository,
sudo add-apt-repository multiverse
To enable restricted repository,
sudo add-apt-repository restricted
NOTE:
After enabling the repositories, don't forget to update it.Run the below command to update the repositories,
sudo apt-get update
-
3what's the difference between your answer and kangaroo's answer, yours seems shorter, and simpler.– speedoxCommented Jun 19, 2015 at 1:31
-
9Because my answer won't work for the versions below 12.10 Commented Jun 19, 2015 at 5:02
-
1Is there also a way to check them first? So you only enable them when they aren't enabled already... For scripting purposes. Commented Apr 30, 2016 at 11:53
-
If they are already enabled, you'll get a message saying that it is already available ``` $ sudo add-apt-repository main 'main' distribution component is already enabled for all sources. ``` Commented Sep 25, 2019 at 14:24
Open dash and type Software sources
then open software sources and click on the the universe repository .
Close and reload cache
To use add-apt-repository, you will need the package software-properties-common:
sudo apt install software-properties-common
Then you can use add-apt-repository to add the needed repository:
sudo add-apt-repository universe
sudo apt update
-
This package is installed by default, so this answer doesn't really add anything new. Commented Mar 15 at 8:28
-
There is an earlier comment about the command being missing, and it was for me as well after creating a minimal bootstrap.– jlainemaCommented Mar 16 at 10:03
-
It is not installed by default in e.g. the Docker image for Ubuntu. Commented Apr 30 at 20:30