Ubuntu安装Emacs出现到依赖问题及解决方案

this page come from : http://www.linuxidc.com/Linux/2014-08/104975.htm



Ubuntu软件中心emacs的版本是23,自己在网上下了最新版24.3,通过编译安装到时候遇到来很多依赖问题,下面将这些问题整理了出来:

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系统的开发库。如果不想在图形界面下使用Emacs,可以使用--without-x选项进行编译(废话),那么只有把GTK+安装上才能通过configure了。

sudo apt-get install libgtk2.0-dev

2.在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

几个图像开发库也要装上

sudo apt-get install libxpm-dev
sudo apt-get install libjpeg62-dev
sudo apt-get install libgif-dev
sudo apt-get install libtiff4-dev


3.利用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

4.因为前面编译过,所以运行make clean && make distclean来清理一下


5.再通过./configure,终端有如下提示:

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

6.sudo make,sudo make install 安装成功
整个编译过程,主要是仔细查看configure的输出,看缺乏哪些库,只要把缺乏的库安装上,就能configure成功,这是关键。
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值