In Ubuntu Linux, I am not able to install any program. When I install programs with apt-get, it always shows the same error: "unable to locate package". For example when I try to install rpm, here is what it shows:
$ sudo apt-get install rpm
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package rpm
Solution:The answer below is provided by Eric Carvalho and Shaan Sundar.
1. After installing Ubuntu if you don't update it followed by Upgrades, This might occur.
2. If there are plenty of software updates to occur in future, make sure all important security updates/recommended updates are turned off by typing "Update Manager" on pressing Alt+F2.
3. Issue One and Two can happen even after updating or clearing all updates. But the eternal solution is: Try point 1 & 2, then type sudo apt-get killmanager, if not working no problem proceed to type sudo apt-get update, then type sudo apt-get upgrade.
Solution 3 solved my problem.
That is:
$sudo apt-get update
$sudo apt-get upgrade
Additional Knowledge:
apt-get
The apt-get command is a powerful command-line tool, which works with Ubuntu's Advanced Packaging Tool (APT) performing such functions as installation of new software packages, upgrade of existing software packages, updating of the package list index, and even upgrading the entire Ubuntu system.
apt-get update
The apt-get update command downloads the package lists from the repositories and "updates" them to get information on the newest versions of packages and their dependencies. It will do this for all repositories and PPAs.
apt-get upgrade
The apt-get upgrade command will fetch new versions of packages existing on the machine if APT knows about these new versions by way of apt-get update.
No comments:
Post a Comment