The error message unable to locate package Ubuntu

One of the many ways of installing software in Ubuntu is apt-get or apt. Installing packages using the package Manager is much easier and safer than searching and downloading programs on the Internet. Open the terminal, you should call the utility apt option install to write the name of the program to install it.

When using this command, sometimes there is an error E: Unable to locate package. Error needs no explanation. A Linux system can’t find the package you are trying to install. But why? Why she doesn’t see the package? Here are a few ways of solving this problem. In this article we will discuss how to fix the error message Unable to locate package error in Ubuntu.

The error message Unable to locate package error in Ubuntu

Next steps consider the process of eliminating errors.

1. Check the package name

This is the first thing you should do. Maybe the package name is a typo? If you are trying to install vlc and wrote the vcl, then surely nothing will happen. Typos are a common problem, so make sure that you do not make mistakes while typing the name of the package.

2. Update the cache of a repository

If you first started the system after installation, you should write the update command:

sudo apt update

This command will not update Ubuntu fully. The apt is update the local list of available to install packages.

When using install, the package Manager looks at the apt cache, to get information about package and version, and then download it from the repositories in the network. If package is not cached, the system will not be able to install it.

The cache in the newly installed system is initially empty. That is why you should run the command apt update immediately after installing Ubuntu or other distributions based on Ubuntu (eg Linux Mint).

Even if the system is not new, the apt cache may be outdated. At any time do not forget to update.

3. Make sure that the package is available in your version of Ubuntu

Great! Have you checked the package name, and it is true. You run the update command to update the status of the cache, but the error message unable to locate package still exists. It is possible that the package is simply not available. But you are following instructions from some website, and everyone turns to set it up this way. In what may be the problem?

You have two options. Either package is available in repository Universe, which in your system is not included or the package does not exist for your version of Ubuntu.

The first step is to check what version of Ubuntu you are running. Open a terminal and type the following command:

lsb_release -a

As a result, you will see a version of Ubuntu and its code name. That is the code name for the us matter the most. As you can see, we use Ubuntu 18.04 with code name bionic. You may have differently, but the essence should be clear. Once you have received the version information and the name, open the Ubuntu Packages website.

Scroll down and stop on the title Search. You will see a field with the keyword. Enter the name of the package that your system can’t find and select the appropriate code name. Section put any. After done, click the search button.

You will be shown package is available for your version of Ubuntu, and if so, with it displays the repository in which it is located. We were looking for a tool to create screenshots Shutter and see what happens for Ubuntu 18.04 Bionic:

In our case, the name of the package exactly coincided. This means that the shutter package exists for Ubuntu 18.04 Bionic, but the repository Universe.

If the required package is available for your version of Ubuntu, but in Universe or Multiverse, these repositories need to include:

sudo add-apt-repository universe multiverse

You also need to update the cache in order to find out about new packages in connected repositories:

sudo apt update

Now the package installation should go smoothly.

Nothing works, what to do?

If the Ubuntu Packages site shows that the package for your version of system not, you will have to find workarounds to install it.

Take as example Shutter. This is a great tool to create screenshots for Linux, but several years were not updated, so in Ubuntu 18.10 and newer versions it is not supported. How to install it? Fortunately, one third party developer has created their own repository (PPA) and install the program, you can use it. To search for packages and PPA in which they are located, are available at Launchpad for Ubuntu.

Note that it is not necessary to connect an unofficial PPA to the repositories list. Better to use those that are in your distribution.

Even if there are no PPA, go to the official website and check if there is a description of the alternative installation methods. Some of the projects there .deb or AppImage files. Others shifted to Snap packages.

In other words, check the official website for any changes the installation method of the application.

If all else fails, it is likely that the project is not supported, and in this case you will have to search the program for a replacement.

In conclusion…

Now you know how to fix the error message unable to locate package Ubuntu. If you start to use Linux recently, everything may seem very confusing. For this reason we cover these topics so you can better understand how to operate certain aspects of your system.

I hope that this guide helped to solve the problem with packages in Ubuntu. If you have questions or suggestions, you can leave them in the comments.

Source: losst.ru

(Visited 8 times, 3 visits today)