编译emacs时遇到的问题---系统:ubuntu12.04.5

来源:互联网 发布:最悲惨的人生 知乎 编辑:程序博客网 时间:2024/05/22 15:02

首先在gnu官网下载emacs24.4源码,解压缩后进入安装步骤


1、进入emacs源吗目录

$ cd emacs-24.4


2、配置文件

$ ./configure

在这一步出现了错误,提示如下:

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

提示要安装GTK+,安装命令如下:

$ sudo apt-get install libgtk2.0-dev

再次config,前面的错误没有出现,但是又出现如下错误:

configure: error: The following required libraries were not found:
    libXpm libjpeg libgif/libungif libtiff
Maybe some development libraries/packages are missing?
If you don't want to link with them give
    --with-xpm=no --with-jpeg=no --with-gif=no --with-tiff=no
as options to configure

提示需要安装libxpm、libjpeg、libgif和libtiff,使用如下命令依次安装:

$ sudo apt-get install libxpm-dev

$ sudo apt-get install libjpeg-dev

$ sudo apt-get install libgif-dev

$ sudo apt-get install libtiff4-dev

然后再次config,前面的错误没有出现,又出现了新的错误:

configure: error: The required function `tputs' was not found in any library.
The following libraries were tried (in order):
  libtinfo, libncurses, libterminfo, libtermcap, libcurses
Please try installing whichever of these libraries is most appropriate
for your system, together with its header files.
For example, a libncurses-dev(el) or similar package.

提示需要‘tputs’函数,但是现有的库中没有包含,使用如下命令安装库文件:

$ sudo apt-get install libtinfo-dev

安装完成后,再次config,没有错误出现。


3、安装emacs

cd到emacs-24.4的目录中使用如下命令:

make;sudo make install

完成安装。

0 0
原创粉丝点击