emacs安装

Posted 阳阳1

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了emacs安装相关的知识,希望对你有一定的参考价值。

一.下载地址:

http://ftp.gnu.org/pub/gnu/emacs/    下载最新的即可,我下载的是emacs-25.2.tar.xz。

 

二.解压后配置安装

tar xvf emacs-25.2.tar.gz

cd emacs-25.2

./configure -prefix=/usr/local/emacs  -with-x-toolkit=gtk

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

需要安装依赖库:

sudo apt-get install libgtk2.0-dev

再次执行./configure -prefix=/usr/local/emacs  -with-x-toolkit=gtk,还是报错:

configure: error: 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 libtiff5-dev

再次执行./configure -prefix=/usr/local/emacs  -with-x-toolkit=gtk,还是报错:

configure: error: The required function ‘tputs‘ was not found in any library.
The following libraries were tried (in order):
libtinfo, 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.

安装sudo apt-get install libncurses-dev

接下来就是make,sudo make install.

 

以上是关于emacs安装的主要内容,如果未能解决你的问题,请参考以下文章

CentOS6.x之emacs安装配置编译

我的emacs配置

安装Emacs并设置racket环境

.emacs 文件(脚本)不起作用

emacs+global的初步使用

维护用户安装的elisp的Emacs自动加载文件?