当前位置:Gxlcms > mysql > ubuntu12.10下手动编译emacs24.2

ubuntu12.10下手动编译emacs24.2

时间:2021-07-01 10:21:17 帮助过:25人阅读

1.执行./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, Lesstif or Motif.

1.执行./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+, 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.

根据提示是缺少X windows系统的开发库。那么只有把依赖的库安装上才能通过configure了。

2. 使用 apt-cache search libgtk*,搜索软件仓库中包含libgtk的有哪些包,我选择了libgtk-3-dev。执行apt-get install libgtk-3-dev。

3.安装X window的开发库后,再次./configure,又出现以下提示:

configure: error: No X toolkit could be found.
If you are sure you want Emacs compiled without an X toolkit, pass
--with-x-toolkit=no
to configure. Otherwise, install the development libraries for the toolkit
that you want to use (e.g. Gtk+) and re-run configure.

提示未找到X toolkit。

4.在configure中增加编译选项,./configure --with-x-toolkit=gtk3,这次配置未提示上述错误,但又出现下面错误:

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/libungif libtiff

5.利用apt-get install 将上述缺少的包及其开发包安装后,继续./configure,还有错误:

configure: error: The required function `tputs' was not found in any library.
These libraries were tried: 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',有可能在libncurses-dev中,那么尝试安装这个包,再configure

6.这种终于配置成功,终端有如下提示:

configure: creating ./config.status
config.status: creating Makefile
config.status: creating lib/Makefile
config.status: creating lib-src/Makefile
config.status: creating oldXMenu/Makefile
config.status: creating doc/emacs/Makefile
config.status: creating doc/misc/Makefile
config.status: creating doc/lispintro/Makefile
config.status: creating doc/lispref/Makefile
config.status: creating src/Makefile
config.status: creating lwlib/Makefile
config.status: creating lisp/Makefile
config.status: creating leim/Makefile
config.status: creating src/config.h
config.status: executing depfiles commands
config.status: executing mkdirs commands
config.status: executing epaths commands
creating src/epaths.h
[ -r "/home/wkd/src/emacs-24.2/src/config.in" ] || ( cd /home/wkd/src/emacs-24.2 && autoheader )
config.status: executing gdbinit commands

7.make,make install 安装成功


整个编译过程,主要是仔细查看configure的输出,看缺乏哪些库,只要把缺乏的库安装上,就能configure成功,这是关键。

人气教程排行