LINUX下安装emacs-24.3遇到了一些问题,通过调查逐一解决了,写个日志希望能帮到其他同学。
1.下载emacs-24.3安装包
http://mirrors.syringanetworks.net/gnu/emacs/
2.解压
% tar -xzvf emacs-21.3.tar.gz
3.编译
% ./configure
这里出现error,提示缺少库libXpm libgif/libungif libtiff
*******************************************************************************
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.
*******************************************************************************
接下来安装缺少的库
①libXpm (libXpm-3.5.10.tar.gz)
Ⅰ.下载安装包
http://cgit.freedesktop.org/xorg/lib/libXpm
Ⅱ.解压
% tar -xzvf libXpm-3.5.10.tar.gz
Ⅲ.编译
% autogen.sh
出现error
************************************************************************
configure.ac:18: error: must install xorg-macros 1.8 or later before running autoconf/autogen
************************************************************************
对Makefile.am文件做如下修改
ACLOCAL_AMFLAGS = -I m4
↓
ACLOCAL_AMFLAGS = -I m4 -I /usr/local/share/aclocal
再次编译(autogen.sh)如果仍然没有解决刚才的问题,就是需要安装xorg-macros了
下载安装包
http://cgit.freedesktop.org/xorg/util/macros/commit/
解压、编译、安装
% unzip util-macros-1.17.1.zip
% autogen.sh
% make
% sudo make install
再次编译(autogen.sh)就通过了
Ⅳ.安装
% make
% sudo make install
libXpm 安装成功
在 /usr/local/lib下面能够看到
②libgif
Ⅰ.下载安装包
http://sourceforge.net/projects/giflib/
Ⅱ.解压
% tar -xzvf giflib-4.2.3.tar.bz2
Ⅲ.编译
% ./confgure
Ⅳ.安装
% make
% sudo make install
libgif 安装成功
在 /usr/local/lib下面能够看到
③libtiff
Ⅰ.下载安装包
ftp://ftp.remotesensing.org/pub/libtiff
Ⅱ.解压
% tar -xjvf tiff-4.0.3.gz
Ⅲ.编译
% ./configure
出现error
****************************************************************************
libtool: install: error: relink `libtiffxx.la' with the above command before installing it
****************************************************************************
对/tiff-4.0.3/libtiff/Makefile做如下修改
注释掉下面几行内容
LINE85 : am__append_6 = libtiffxx.la
LINE528: libtiffxx.la: $(libtiffxx_la_OBJECTS) $(libtiffxx_la_DEPENDENCIES) $(EXTRA_libtiffxx_la_DEPENDENCIES)
LINE529: $(AM_V_CXXLD)$(libtiffxx_la_LINK) $(am_libtiffxx_la_rpath) $(libtiffxx_la_OBJECTS) $(libtiffxx_la_LIBADD) $(LIBS)
重新编译
% ./configure
Ⅳ.安装
% make
% sudo make install
libtiff 安装成功
在 /usr/local/lib下面能够看到