Solved : Unable to locate package error in Ubuntu

Unable to locate package ubuntu

During installation of a package in ubuntu you may get an error 
Unable to locate package . 

In this post we will show you how you can fix that error and continue with your installation. 

Below is a sample error I got while installing vagrant.  But, the solution discussed below is common for any package installation in ubuntu.

root@cloudvedas:~# apt install vagrant
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package vagrant

To resolve this issue you have to update your apt repo. You can simply do this by running below command as root user or use sudo .

root@cloudvedas:~# apt update


user@cloudvedas:~# sudo apt update

Once the apt update is successfully completed you can try the installation once more.

root@cloudvedas:~# apt install vagrant


user@cloudvedas:~# sudo apt install vagrant

It should work now.

Do let us know in the comment section if you are still facing any issue after following the above steps.

No comments:

Post a Comment