Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have tried to install emacs from source that I downloaded from the internet.

For that first I have chosen a path like:

/home/anand/emac/emac-23.1 (where emac-23.1 is the extracted file)

Then I make it run like follows:

root@anand:/home/anand/softwares/emac/emacs-23.1# ./configure

But it displays:

checking build system type... i686-pc-linux-gnulibc1
checking host system type... i686-pc-linux-gnulibc1
checking for gcc... gcc
checking for C compiler default output file name... 
configure: error: C compiler cannot create executables
See `config.log' for more details.

I also tried another way:

sudo apt-get install emacs

But it displays:

Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Couldn't find package emacs

All the above was done under an Admin Login, but I couldn't get it to work.

share|improve this question

migrated from Oct 15 '09 at 5:34

This question came from our site for professional and enthusiast programmers.

Ubuntu linux comes without a lot of the things needed to compile programs. I think gnibbler's answer is correct, although I haven't tried it. – delete Oct 15 '09 at 5:06
Try sudo apt-get install emacs you missed the s off the end! – gnibbler Oct 15 '09 at 5:10
Try running "sudo apt-cache search emacs", this should show you all packages which might have something to do with emacs. – Bobby Oct 15 '09 at 6:51
Also see Minimal emacs24 installation on ubuntu. It provides instructions for downloading and building Emacs 24.5 from sources that is about 25 MB in size. Its a 4x improvement over a standard emacs-nox package install from Debian and Ubuntu. – jww Jan 26 at 3:41

$ sudo apt-get install build-essential
$ sudo apt-get build-dep emacs

Will help you download all the dependencies

My ubuntu has emacs22, if that will work for you

$ sudo apt-get install emacs <==note you missed the s on the end when you tried before

share|improve this answer
Does this work for Emacs 23.1? – delete Oct 15 '09 at 5:07
This will get the dependancies. However, you'll also need a build system installed, which you can get with the following: sudo apt-get install build-essential – MichaelM Oct 15 '09 at 5:10
@Kinopiko: Try it. The repositories are usually kept relatively up to date, and the dependencies of software don't actually change that frequently. – mpen Oct 15 '09 at 5:10
@MichaelM, thanks I added that – gnibbler Oct 15 '09 at 5:14

sudo apt-get install emac

You have the package name wrong. Try:

sudo apt-get install emacs
share|improve this answer
after using this same problem .. sudo apt-get install emacs actually i missed that s when i was copying this errors to notepad but first only i am using the above command... – Aravind Oct 15 '09 at 5:26

Are you using this in the shell or gnome?

try emacs snapshot for a better UI that looks like something which was not made in the 1990s

sudo apt-get install -y emacs-snapshot emacs-snapshot-el

and to launch it from without a windowing system

emacs -nw /path/to/your/file
share|improve this answer

sudo aptitude install emacs23

share|improve this answer

When connected to the internet, execute: sudo apt-get emacs

share|improve this answer

Your Answer


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