Spacemacs在Ubuntu的安装配置

1.更新apt-get源:

这一步是建议要做的, 因为emacs的x-windows界面依赖很多新版本的图像库(如libgtk2.0), 如果你的源比较旧,这些库是没办法更新的, 至少我遇到了这个问题...

将以下配置覆盖到/etc/apt/sources.list ,重新执行 sudo apt-get update即可:

deb http://cn.archive.ubuntu.com/ubuntu/ trusty main restricted universe multiverse
deb http://cn.archive.ubuntu.com/ubuntu/ trusty-security main restricted universe multiverse
deb http://cn.archive.ubuntu.com/ubuntu/ trusty-updates main restricted universe multiverse
deb http://cn.archive.ubuntu.com/ubuntu/ trusty-backports main restricted universe multiverse

deb http://cn.archive.ubuntu.com/ubuntu/ trusty-proposed main restricted universe multiverse

deb-src http://cn.archive.ubuntu.com/ubuntu/ trusty main restricted universe multiverse
deb-src http://cn.archive.ubuntu.com/ubuntu/ trusty-security main restricted universe multiverse
deb-src http://cn.archive.ubuntu.com/ubuntu/ trusty-updates main restricted universe multiverse
deb-src http://cn.archive.ubuntu.com/ubuntu/ trusty-backports main restricted universe multiverse

deb-src http://cn.archive.ubuntu.com/ubuntu/ trusty-proposed main restricted universe multiverse

trusty是14.04版本代号, 其他版本代码如下:

18.04 bionic

17.10 artful

16.04 xenial

14.04 trusty

2. 安装依赖的库

sudo apt-get install libgtk2.0-dev
sudo apt-get install libxpm-dev
sudo apt-get install libjpeg62-dev
sudo apt-get install libgif-dev
sudo apt-get install libtiff5-dev
sudo apt-get install libncurses5-dev
sudo apt-get install libcanberra* 

3.源码安装:

下载连接: http://mirrors.ustc.edu.cn/gnu/emacs/

编译安装 (如果不需要x-windows界面, 可以携带参数   --without-x)

./configure

make

sudo make install

4. Spacemacs仓库同步:

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

5. 中文输入法的支持

如果需要在emacs中支持中文输入法, 建议在 /etc/profile 下添加以下配置:

export LC_CTYPE=zh_CN.UTF-8

另外,因为C-SPACE快捷键被Spacemacs占用,建议改变系统的切换输入法快捷键(如C-F12)

 

你可能感兴趣的:(Spacemacs在Ubuntu的安装配置)