详解安装emac-25.3过程及问题解决

本人安装环境为centos7,其他linux版本也大同小异,可参考操作。
1. 下载emacs-25.3.tar.gz到centos,用tar –vxzf 命令解压;
2. 进入解压后的目录,命令:cd emacs-25.3/
3. 使用./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.

意思就是缺少图形界面的支持库,如果不想在图形界面下使用Emacs,可以使用./configure –without-x命令执行(看自己需求,我就只想在命令行使用,还专门修改了启动配置为在非图形界面启动),当然很多人还是想使用图形界面的,那么就需要安装相应的支持库了,报错的提示是安装Gtk+ 或者 Motif,我们安装其中一个即可。
执行命令:yum install gtk3*
然后再接着执行:./configure
发现又报如下错误:

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
这还是缺少相应库支持的缘故,执行以下命令:
yum install libXpm libXpm-devel libjpeg libjpeg-devel libgif libgif-devel libungif libungif-devel libtiff libtiff-devel
然后再接着执行:./configure
发现又报如下错误:
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.
继续安装支持库,执行以下命令:yum install ncurses-devel
然后再接着执行:./configure
此刻,没有报错信息的出现,用ls命令查看后我们看到了期待已久的Makefile文件,接着执行make和make install命令,静静的等着安装完成。

本文链接:https://my.lmcjl.com/post/6159.html

展开阅读全文

4 评论

留下您的评论.