首页 > 代码库 > emacs安装
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安装