CentOS7.6下源码安装Emacs 26.3

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

下面详细介绍如何在CentOS 7.6下源码安装Emacs 26.3的全过程。

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. 安装前配置

[linuxidc@localhost emacs-26.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.

......

CentOS 7.6下源码安装Emacs 26.3
CentOS 7.6下源码安装Emacs 26.3

[linuxidc@localhost emacs-26.3]$ ./configure --with-x-toolkit=no

添加参数重新配置

......

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。

[linuxidc@localhost emacs-26.3]$ ./configure --with-x-toolkit=no --with-gif=no --with-tiff=no --with-gnutls=no

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

[linuxidc@localhost emacs-26.3]$ sudo yum install -y libXpm-devel

CentOS 7.6下源码安装Emacs 26.3

然后再次

[linuxidc@localhost emacs-26.3]$ ./configure --with-x-toolkit=no --with-gif=no --with-tiff=no --with-gnutls=no

4. 安装

[linuxidc@localhost emacs-26.3]$ make

CentOS 7.6下源码安装Emacs 26.3

[linuxidc@localhost emacs-26.3]$ sudo make install

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

Emacs 26.3 发布,附带GPG密钥用于GNU ELPA包签名检查 https://8ym8.com/574756.html

本文由 8源码吧 作者:吧主 发表,其版权均为 8源码吧 所有,文章内容系作者个人观点,不代表 8源码吧 对观点赞同或支持。如需转载,请注明文章来源。

发表评论