CentOS 7.6下源码安装Emacs 26.3

Emacs 26.3已经发布,现在可以使用Emacs文本编辑器的26.3版了。此版本主要是维护版本,其中包含GNU ELPA软件包的新GPG密钥。

1、下载找到Emacs的最新版本

可在这里查看下载 http://gnu.mirrors.pair.com/emacs/

CentOS 7.6下源码安装Emacs 26.3

找对最新的版本,在此我下载的是emacs-26.3.tar.xz版本。

2. 下载

可直接复制链接用wget [链接]  来下载
wget https://mirrors.sjtug.sjtu.edu.cn/gnu/emacs/emacs-26.3.tar.xz
xz -d emacs-26.3.tar.xz  # 解压
tar -xvf emacs-26.3.tar 
cd emacs-26.3.tar.xz  # 进入安装目录

3. 安装前配置

由于没有相关依赖,有如下错误:

......

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.

......

CentOS 7.6下源码安装Emacs 26.3

CentOS 7.6下源码安装Emacs 26.3

添加参数重新配置

......

checking gif_lib.h usability... no
checking gif_lib.h presence... no
checking for gif_lib.h... no
configure: error: The following required libraries were not found:
    libXpm libgif/libungif gnutls
Maybe some development libraries/packages are missing?
If you don't want to link with them give
    --with-xpm=no --with-gif=no --with-gnutls=no
as options to configure

......

CentOS 7.6下源码安装Emacs 26.3

CentOS 7.6下源码安装Emacs 26.3

取消相关link。

CentOS 7.6下源码安装Emacs 26.3

再次提示:

......

configure: error: The following required libraries were not found:
    libXpm
Maybe some development libraries/packages are missing?
If you don't want to link with them give
    --with-xpm=no
as options to configure

......

安装 libXpm

CentOS 7.6下源码安装Emacs 26.3

然后再次

4. 安装

CentOS 7.6下源码安装Emacs 26.3

CentOS 7.6下源码安装Emacs 26.3

5. 安装后配置

进入home目录。

# cd
# git clone https://github.com/combofish/emacs.d
# mv emacs.d .emacs.d
# emacs -nw

等待emacs加载完成就可以爽敲代码了。

CentOS 7.6下源码安装Emacs 26.3

猜你喜欢

转载自www.linuxidc.com/Linux/2019-09/160451.htm