[E: Unable to locate package xyz]
You are surprised that others must have the package available. You can search the Internet and find a solution to enable the Universe, Universe repository to install this package.
Enable Repository
[sudo add-apt-repository universe multiversesudo apt update]
You have installed the universe repository and the multi universe but do you know what these repositories are? How do they play a role in installing packages? Why are there multiple repositories?
I will explain all these issues in detail here.
Concept Repository in Ubuntu
Well, so you already know that to install the program on Ubuntu, you can use the apt command. This is the same as the APT package manager used by Ubuntu Software Center below. Therefore, all programs (except Snap packages) that you see in the Program Center are essentially APT.
Have you ever wondered where the right software, installs the software? How do I know which packages are available and which ones do not exist?
The APT Package Manager retrieves the repository information from the /etc/apt/sources.list file and the files listed in the /etc/apt/sources.list.d directory. Warehouse information is usually in the following format:
[deb http://us.archive.ubuntu.com/ubuntu/ bionic main]
In fact, you can go to the server address above and figure out how to structure the inventory.
When you upgrade Ubuntu by using the apt update command, the apt package Manager obtains information about the available packages (and their version information) from the repositories and stores them in the local cache. You can see this in the /var/lib/apt/lists directory.
Keeping this information locally speeds up your search because you do not have to browse the Web and search the available packages database only to see if a particular package is available.
Now you know how repository play an important role, let's see why there are several repositories provided by Ubuntu.
Ubuntu repositories: Home, Universe, Multi Universe, Restricted and Shared
The program is divided into Ubuntu repository into five categories: main, universe, multi-universe, restricted, and shared.
Why is Ubuntu doing this? Why not put all the programs in one repository? To answer this question, let's see what these repositories are:
Main
When you install Ubuntu, this is the repository that is enabled by default. The main repository consists of free and open source software (FOSS) that can be freely distributed without any restrictions.
The software in this repository is fully supported by Ubuntu developers. This is what Ubuntu will provide security updates until your system reaches the end of its useful life.
Universe
This repository also consists of a free and open source program, but Ubuntu does not guarantee regular software security updates in this category.
The software in this category is packaged and maintained by the community. The Universe repository contains a large number of open source programs and thus allows you access to a large number of programs through the apt package manager.
The Multiverse Universe
The multiplex universe contains programs that are not FOSS. Due to legal and licensing issues, Ubuntu cannot enable this repository by default and can not provide fixes and updates.
It is up to you to decide whether you want to use the Multiverse repository and verify that you have the right to use the software.
Restricted
Ubuntu tries to provide free and open source software only, but this is not always possible, especially when it comes to hardware support.
Blocked repositories consist of special drivers.
Shared
This repository consists of a monopolistic program packaged by Ubuntu for its partners. Previously, Ubuntu used to provide Skype through this repository.
Third-party repositories and PPAs (not provided by Ubuntu)
The above five Repo is provided by Ubuntu. You can also add third-party repositories (it's up to you if you want) to access more programs or access a newer version of the software (where Ubuntu can provide older versions of the same software).
For example, if you add a repository provided by VirtualBox, you can obtain the latest version of VirtualBox. It will add a new entry in your sources.list.
You can also install additional applications by using the Personal Package Archive (PPA). I wrote about what a CPA is and how it works in detail, so read this article.
Add Universe, Multiverse Universe, and other repositories
As previously reported, the main repository is enabled only by default when installing Ubuntu. To access more programs, you can add additional repositories.
Let me show you how to do this in the command line first, then I'll also show you GUI forms.
To enable the universe repository, use:
[sudo add-apt-repository universe]
To enable Restricted repository, use:
[sudo add-apt-repository restricted]
To enable the Multiverse repository, use this command:
[sudo add-apt-repository multiverse]
You must use the sudo update apt command after you add the storage repository so that the system creates the local cache with package information.
If you want to remove a repository, simply add -r as sudo add-apt-repository -r universe.
How do you know which repositories the package belongs to?
Ubuntu has a dedicated Web site that provides information about all the packages available in the Ubuntu file. Go to the Ubuntu Packages site.
You can search for the package name in the search field. You can specify whether you are looking for a specific version of Ubuntu or a specific repository. Best to use the "Any" option in both fields.
It will show all corresponding packages, Ubuntu versions and inventory information.
As you can see above, the tor package is available in the Universe repository for different versions of Ubuntu.
conclusion
I hope this article has helped you understand the concept of repositories in Ubuntu.
If you have any questions or suggestions, please feel free to leave a comment below. If you liked the article, share it on social networking sites like Reddit and Hacker News.
Source and thank to : itsfoss
- [message]
- ##laptop## Support
- Support Us by Disable your ad block.
- thank you
COMMENTS