编译emacs时的x错误

Uubntu下编译emacs经常会遇到如下错误,虽然可以指定--without-x,但是最好还是把x界面编译进emacs比较好,以防后面会使用。

错误如下:

………………
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.

解决方法:

sudo apt-get install libgtk2.0-dev
sudo apt-get install libxpm-dev
sudo apt-get install libjpeg62-dev
sudo apt-get install libgif-dev
sudo apt-get install libtiff4-dev
sudo apt-get install libncurses5-dev

./configure
make
make install


你可能感兴趣的:(编译emacs时的x错误)