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.

I am getting this error:

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

Moreover, I ran:

sudo apt-get upgrade
Reading package lists... Done
Building dependency tree       
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

I have the latest public release version 12.10 Quantal Quetzal of Ubuntu.

share|improve this question
    
Please don't say "newest", as this can change over time. The newest LTS release is 12.04 Precise Pangolin(which I use.) The latest Public release is 12.10 Quantal Quetzal. The latest latest release (as of time of writing) is the 13.04 Raring Ringtal beta. So please edit the proper version into your question. (there is an edit link right above this comment, just to the right of "share".) –  JamesTheAwesomeDude Apr 6 '13 at 5:31
1  
i have edited the reply . sorry for that slip –  aditya Apr 6 '13 at 5:38
    
Hey, if I fixed it, I would appreciate it a lot if you'd click the green checkmark to the left of my answer. This marks your problem as solved, which makes it easier for new users to get help with their Ubuntu issues, also I get some Reputation as a reward for being so helpful (also, you get a little reputation ;) –  JamesTheAwesomeDude Apr 22 '13 at 21:48

2 Answers 2

You need to update your package lists.

Run:

sudo apt-get update

Then try again. That will fix everything.

You see, when Ubuntu software developers write their software, they send it to the Launchpad servers, where they compile and process the code. Once the code has been successfully compiled, the new package replaces the old package, and the package lists are updated to reflect that change.

Note that it's just the package lists on their server, not your computer. sudo apt-get update fetches the latest package infofrom the servers, at which point your computer processes it.
sudo apt-get upgrade checks the package lists (the ones stored on your computer,) and compares the software in the package list with the actual versions you have installed. If any of your software has a version newer than it listed in the package list, it will download and install it.

Running sudo apt-get install <PACKAGE> checks your package list for that software. If found, it downloads and installs it.
(note that the package lists do not contain the software themselves - only the name, version, and the URL to download the software.)

Anyway, I hope my little speech helped you understand Ubuntu's package system a little better!

share|improve this answer
1  
+1, Maby you should explain sudo apt-get dist-upgrade to then it is complete ;-) –  Thomas15v Apr 6 '13 at 7:44

run sudo apt-get update then try to install again.

If that does not work use the graphical software center and see what you get. emacs23 looks to be a valid package name.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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