1. 找到最新的版本
可在这里寻找 http://gnu.mirrors.pair.com/emacs/
找对最新的版本,在此我下载的是emacs-26.1.tar.xz版本。
2. 下载
可直接复制链接用wget [链接] 来下载
wget http://gnu.mirrors.pair.com/emacs/emacs-26.1.tar.xz
xz -d emacs-26.1.tar.xz # 解压
tar -xvf emacs-26.1.tar
cd emacs-26.1.tar.xz # 进入安装目录
3. 安装前配置
#./configure
由于我不用图形化界面没有相关依赖,有如下错误:
...
checking for libXaw... configure: error: No X toolkit could be found.
If you are sure you want Emacs compiled without an X toolkit, pass
--with-x-toolkit=no
to configure. Otherwise, install the development libraries for the toolkit
that you want to use (e.g. Gtk+) and re-run configure.
...
[root@cloudpc emacs-26.1]# ./configure --with-x-toolkit=no
添加参数重新配置,
...
checking for gif_lib.h... no
configure: error: The following required libraries were not found:
libgif/libungif libtiff gnutls
Maybe some development libraries/packages are missing?
If you don't want to link with them give
--with-gif=no --with-tiff=no --with-gnutls=no
as options to configure
...
取消想关link。
[root@cloudpc emacs-26.1]# ./configure --with-x-toolkit=no --with-gif=no --with-tiff=no --with-gnutls=no
4. 安装
# make
# sudo make instal
5. 安装后配置
进入家目录。
# cd
# git clone https://github.com/combofish/emacs.d
# mv emacs.d .emacs.d
# emacs -nw
等待emacs加载完成就可以爽敲代码了。
注:装载请注明出处。