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 trying to compile emacs on Ubuntu 12.04. This is because I want to use emacs 24.2. But I am getting this error. How can I fix it?

checking for long file names... yes
checking for X... no
checking for X... true
configure: error: You seem to be running X, but no X development libraries
were found.  You should install the relevant development files for X
and for the toolkit you want, such as Gtk+, Lesstif or Motif.  Also make
sure you have development files for image handling, i.e.
tiff, gif, jpeg, png and xpm.
If you are sure you want Emacs compiled without X window support, pass
  --without-x
to configure.
share|improve this question

2 Answers 2

If you run

sudo apt-get build-dep emacs23

that installs everything that is needed to compile the emacs23 package. Quite likely that's enough to compile Emacs 24.2, too.

share|improve this answer
    
Or, in Ubuntu 14: sudo apt-get build-dep emacs24 –  nnyby Oct 22 at 15:23

I used to do it this way:

sudo apt-get install build-essential texinfo libx11-dev libxpm-dev libjpeg-dev libpng-dev libgif-dev libtiff-dev libgtk2.0-dev libncurses-dev 

git clone --depth=1 git://git.savannah.gnu.org/emacs.git
./autogen.sh # not needed when installing from tarball
./configure
make bootstrap
sudo make install

To build docs:

make info
make dvi
cd ./doc/lispref/
make html
make pdf

But now I just use the package

sudo add-apt-repository ppa:cassou/emacs
sudo apt-get update
sudo apt-get install emacs-snapshot
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.