前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >Ubuntu安装Emacs出现到依赖问题及解决方案

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

作者头像
用户8710806
修改2021-06-11 09:57:43
1.6K0
修改2021-06-11 09:57:43
举报
文章被收录于专栏:linux百科小宇宙

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成功,这是关键。

为Emacs配置newLISP开发环境 http://www.linuxidc.com/Linux/2013-01/78463.htm

手把手教你学会 Emacs 主题配置 http://www.linuxidc.com/Linux/2012-10/72342.htm

Ubuntu下编译安装Emacs23  http://www.linuxidc.com/Linux/2009-08/21348.htm

手把手教你学会 Emacs 定制 http://www.linuxidc.com/Linux/2012-10/72341.htm

如何在GNU Emacs环境下编译并运行C/C++程序? http://www.linuxidc.com/Linux/2012-08/68299.htm

本文系转载,前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文系转载前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档