CentOS5.9 编译Emacs 24

Posted slgkaifa

tags:

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

从Emacs官方网站下载最新版解压后,执行

./configure
得到错误信息:

configure: error: The following required libraries were not found:
    libXpm libjpeg libgif/libungif libtiff


用以下的命令安装依赖库:

yum -y install libjpeg-devel.x86_64 giflib-devel.x86_64 libtiff-devel.x86_64

再次执行./configure。还有错误信息:

configure: error: The following required libraries were not found:
    libXpm libjpeg


继续安装
yum install libjpeg-devel

yum install libXpm-devel

如今能够编译了。用make就可以。

可是链接报错:

xsettings.o: In function `something_changed_gsettingsCB‘:
/opt/emacs-24.3/src/xsettings.c:215: undefined reference to `g_settings_get_value‘
/opt/emacs-24.3/src/xsettings.c:230: undefined reference to `g_settings_get_value‘
/opt/emacs-24.3/src/xsettings.c:244: undefined reference to `g_settings_get_value‘
xsettings.o: In function `init_gsettings‘:
/opt/emacs-24.3/src/xsettings.c:816: undefined reference to `g_settings_list_schemas‘
/opt/emacs-24.3/src/xsettings.c:822: undefined reference to `g_settings_new‘
/opt/emacs-24.3/src/xsettings.c:828: undefined reference to `g_settings_get_value‘
/opt/emacs-24.3/src/xsettings.c:839: undefined reference to `g_settings_get_value‘
/opt/emacs-24.3/src/xsettings.c:848: undefined reference to `g_settings_get_value‘
collect2: ld returned 1 exit status
make[1]: *** [temacs] Error 1


这里介绍了一个方法绕过:

http://lists.gnu.org/archive/html/bug-gnu-emacs/2014-03/msg01031.html


如今清理后又一次编译:

make distclean
./configure --without-gsettings
make


执行make install ,成功安装。






以上是关于CentOS5.9 编译Emacs 24的主要内容,如果未能解决你的问题,请参考以下文章

emacs 去除 shell 中的所有 ansi 颜色代码

Emacs日常 2021/4/30

如何在使用 emacs for erlang 编译时节省键盘操作时间?

在 Emacs 中使用 Visual Studio 6 C++ 编译器

CentOS6.x之emacs安装配置编译

Emacs 24.4 正式发布!!!