Bboysoul's Blog

首页 公告 RSS

linux-编译安装emacs和安装spacemacs

February 16, 2017 本文有 251 个字 需要花费 1 分钟阅读

下载

wget http://mirrors.ustc.edu.cn/gnu/emacs/emacs-25.1.tar.xz
tar xvf emacs-25.1.tar.xz

编译安装

./configure --prefix=/usr/local/emacs

  • 报错
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.

sudo aptitude install libgtk2.0-dev
注意可能会遇到apt-get解决不了的依赖问题,所以用到aptitude
sudo apt-get install libXpm-dev libjpeg-dev libgif-dev libtiff5-dev
make -j4
sudo make install

把emacs的安装目录加入环境变量

编辑自己home文件夹下的.profile文件
vim /home/bboysoul/.profile
添加下面这行
export PATH="$PATH:/usr/local/emacs/bin"

然后执行
source /home/bboysoul/.profile

创建emacs的图标

进入
cd /usr/local/emacs/share/applications
把下面这个文件复制到
cp emacs.desktop /usr/share/applications/
之后注销重新登录一下就可以找到图标了

安装spacemacs

git clone https://github.com/syl20bnr/spacemacs ~/.emacs.d


Tags:

本站总访问量 本站总访客数