Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

My apt-get doesn't install any programs. I try to install programs with apt-get install but always it shows same error: unable to locate package. For example I try to install the xbmc media center; here's what happens:

$ sudo apt-get install xbmc    
Reading package lists... Done    
Building dependency tree           
Reading state information... Done    
E: Unable to locate package xbmc

I have updated my package list with sudo apt-get update.

share|improve this question
"My apt-get doesn't install any programs." Try some package other than xmbc. –  hexafraction Jul 2 '12 at 20:29

2 Answers 2

up vote 5 down vote accepted

xbmc is only available in the universe repository, only since Ubuntu 12.04 (precise). If you have an older release of Ubuntu, you'll need to upgrade or to get xbmc from another place.

If you have Ubuntu 12.04, make sure that you have turned on the universe repository. You can see what repositories you have enabled in the file /etc/apt/sources.list (and in files in the directory /etc/apt/sources.list.d). Check that this file contains a line like

deb http://al.archive.ubuntu.com/ubuntu/ precise universe


deb http://zw.archive.ubuntu.com/ubuntu/ precise main restricted universe multiverse

If you only find a line like

deb http://mn.archive.ubuntu.com/ubuntu/ precise main restricted

and no line with universe, add universe at the end of that line, or a separate line with precise universe, as illustrated above.

If you need to modify /etc/apt/sources.list, run sudo apt-get update afterwards, then try installing again. If the package is still not found, post the complete content of /etc/apt/sources.list and the output of sudo apt-get update.

share|improve this answer
@EliahKagan I hadn't thought my answer could be interpreted that way, I tried to clarify. Why not al and zw? (I try to select an appropriate mirror for the OP when they give a clue, but here I have no idea.) –  Gilles Jul 2 '12 at 20:26

I'm new to Ubuntu but i'm writing this as I discovered some solutions to avoid this "Unable to Locate Package" errors. There are three circumstances where this might occur to a shock.

  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.

Now you should be able to install any software through Terminal.

share|improve this answer
If You still get error on "sudo apt-get update" line, try using "sudo apt-get upgrade". This will work.. Guys !! As Linux is highly case sensitive Please make sure you use all commands in smaller letters like "sudo" instead of "Sudo" –  Shaan Sundar Dec 25 '12 at 13:36

protected by Community Jan 16 '13 at 17:19

Thank you for your interest in this question. Because it has attracted low-quality answers, posting an answer now requires 10 reputation on this site.

Would you like to answer one of these unanswered questions instead?

Not the answer you're looking for? Browse other questions tagged or ask your own question.