zl程序教程

您现在的位置是:首页 >  系统

当前栏目

CentOS编译安装emacs 25.3 错误 make: *** No targets specified and no makefile found. Stop.

centos错误安装 and 编译 No found specified
2023-09-11 14:21:25 时间

今天在一台很久没有动过的vps上编译安装emacs 25.3时,遇到 make: *** No targets specified and no makefile found. Stop.错误

其实解决起来很简单,就是需要先 yum update 一下。整个过程如下:


yum update
cd /usr/loca/src
wget http://mirrors.ustc.edu.cn/gnu/emacs/emacs-25.3.tar.gz 
tar -xvf ~/emacs-25.3.tar.gz 

安装依赖库

yum install gcc* glib* gtk* ncurses* libXpm* giflib* libjpeg* libtiff* libpng* -y
mkdir emacs_build      
cd emacs_build/
sudo../emacs-25.1/configure
sudo make && sudo make install

默认会安装在 /usr/local/bin 下, 如果它没有添加在你的环境变量中,需要修改 /etc/profile 文件,在文件末尾加上如下两行代码 

PATH=$PATH:/usr/local/bin 
export PATH

然后运行 

source /etc/profile
然后运行
emacs --version

就可以看到如下信息:

[ emacs_build]# emacs --version
GNU Emacs 25.3.1
Copyright (C) 2017 Free Software Foundation, Inc.
GNU Emacs comes with ABSOLUTELY NO WARRANTY.
You may redistribute copies of GNU Emacs
under the terms of the GNU General Public License.
For more information about these matters, see the file named COPYING.