ubuntu编译安装emacs

原文链接  http://blog.csdn.net/gexueyuan/article/details/6452459

 用apt-get安装emacs的话,版本是23.1.1,版本太低,所以在GNU的网站下了一个GNU emacs来安装。

 

将在GNU的ftp下载的文件包解压到一目录,cd进入该目录,然后 ./configure进行配置生成make文件,但是运行完一阵子后报错如下

 

[c-sharp]  view plain copy
  1. You seem to be running X, but no X development libraries  
  2. were found. You should install the relevant development files for X  
  3. and for the toolkit you want, such as Gtk+, Lesstif or Motif. Also make  
  4. sure you have development files for image handling, i.e.  
  5. tiff, gif, jpeg, png and xpm.  
  6. If you are sure you want Emacs compiled without X window support, pass  
  7. --without-x  
  8. to configure.  

 

原来是没有安装GTK的开发库,可以安装最新的gtk-3也可以安装gtk-2.0

 

[c-sharp]  view plain copy
  1. sudo apt-get install libgtk2.0-dev  

 

或者选择用系统里的Synaptic管理器进行安装

 

 

再运行./configure ,没想到又报错了,如下:

[c-sharp]  view plain copy
  1. configure: error: The following required libraries were not found:  
  2.     libXpm libjpeg libgif/libungif libtiff  
  3. Maybe some development libraries/packages are missing?  
  4. If you don't want to link with them give  
  5.     --with-xpm=no --with-jpeg=no --with-gif=no --with-tiff=no  
  6. as options to configure   

 

貌似是缺几个库:
    libXpm libjpeg libgif/libungif libtiff

 

 

再进行安装

[c-sharp]  view plain copy
  1. sudo apt-get install libxpm-dev  
  2. sudo apt-get install libjpeg62-dev  
  3. sudo apt-get install libgif-dev  
  4. sudo apt-get install libtiff4-dev  

 

然后再运行./configure ,这下终于可以正常地跑到结束了,看输出的信息,该生成的文件都生成了。于是,运行make ,再运行sudo make install ,经过一段时间后,编译结束,安装成功。

 

 

如果遇到编译错误。并且打开emacs后报错为“Cannot open termcap database file”, 少了个叫libncurses5-dev库,于是,运行:


 
 
[c-sharp] view plain copy
  1. sudo apt-get install libncurses5-dev  
因为前面编译过,所以运行make cleanmake distclean 来清理一下, 再重新运行./configuremakesudo make install ,这回就完全安装成功了
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值