自己 build emacs 24.5
来源:互联网 发布:2016淘宝日刷千单 编辑:程序博客网 时间:2024/06/10 06:41
因为 Ubuntu 14.04 LTS 默认最新的 emacs 版本为 24.3,但为了使用 spacemacs 配置,必须升级到 24.4 或更高,
以下为手动编译 emacs 到 24.5,
- 先卸载已安装的 emacs,
# apt-get remove emacs
# apt-get autoremove
如果你安装了老版本的emacs,删除之
$ sudo apt-get purge emacs-snapshot-common emacs-snapshot-bin-common emacs-snapshot emacs-snapshot-el emacs-snapshot-gtk emacs23 emacs23-bin-common emacs23-common emacs23-el emacs23-nox emacs23-lucid auctex emacs24 emacs24-bin-common emacs24-common
- 在 https://www.gnu.org/prep/ftp.html 找最近的 mirror list 站点下载安装包 emacs-24.5.tar.gz
$ tar --gzip -xvf emacs-24.5.tar.gz
$ cd emacs-24.5
$ ./configure
这一步一般会遇到缺少 GTK 相关 lib 的问题,
when configure the emacs: error like this!
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+, Lesstif 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 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 libtiff4-dev
$ sudo apt-get install libncurses5-dev
重新 config
$ ./configure
$ make
切换到 root 用户,
# make install
这样 emacs 安装在 /usr/local/bin/ 下。
之后退出 terminal 重新启动,即可,使用 $ emacs -version 查看版本,已升到新版 :)
- 卸载编译安装的 emacs
$ tar --gzip -xvf emacs-24.5.tar.gz
$ cd emacs-24.5
$ ./configure
$ sudo make uninstal
为支持 gvim 的 tag 功能,安装 ctags 和 cscope
# apt-get install exuberant-ctags
# apt-get install cscope
解决 Emacs gdb 可能的启动问题
#===== solve the Emacs gdb start error:
#
# Error:
#
#"/usr/share/gdb/auto-load/usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.19-gdb.py", line 63, in <module>
# from libstdcxx.v6.printers import register_libstdcxx_printers
# ImportError: No module named 'libstdcxx'
#
# Solution Refer:
#
# http://stackoverflow.com/questions/31062010/ubuntu-14-04-gcc-4-8-4-gdb-pretty-printing-doesnt-work-because-of-python-issu
#
# create file "~/.gdbinit", add following statement,
python sys.path.append("/usr/share/gcc-4.8/python")
默认 gnu elpa 源用除gnu elpa melpa
;; MELPA
;;
more
packages
(setq package-archives
'((
"gnu"
.
"http://elpa.gnu.org/packages/"
)
(
"melpa-stable"
.
"http://stable.melpa.org/packages/"
)
;; (
"melpa"
.
"https://melpa.org/packages/"
)
))
三. 由于spacemacs需要下载很多插件。由于插件源网络关系,下载极慢而且不稳定;所以修改插件源为清华服务器。实现方法如下:
在第一步骤开始下载插件的过程中,强制退出emacs。
.spacemacs出现。修改其中的代码:
(defun dotspacemacs/user-init () "Initialization function for user code.It is called immediately after `dotspacemacs/init', before layer configurationexecutes. This function is mostly useful for variables that need to be setbefore packages are loaded. If you are unsure, you should try in setting them in`dotspacemacs/user-config' first." (setq-default configuration-layer--elpa-archives '(("melpa-cn" . "https://mirrors.tuna.tsinghua.edu.cn/elpa/melpa/") ("gnu-cn" . "https://mirrors.tuna.tsinghua.edu.cn/elpa/gnu/") ("org-cn" . "https://mirrors.tuna.tsinghua.edu.cn/elpa/org/"))) )
最后一路顺利通关。
warning:spacemacs默认字体”Source Code Pro”不存在。解决方法如下:
dotspacemacs-default-font '("Courier New" :size 13 :weight normal :width normal :powerline-scale 1.1)
补充:安装其它插件package的时候,也许会碰到一些问题。可以选择性exclude_package掉。
后来又从网上搜到解决方式, 就是排除这个包
dotspacemacs-excluded-packages '(evil-unimpaired)
如果遇到下述问题:
- 1
- 2
- 3
- 4
解决办法:
把.cache清空以后挂个代理,确认能不能用github,启动以后应该能成功安装。还是不行就手动把https://github.com/melpa/melpa下载到~/.emacs.d/.cache/quelpa/melpa,然后重启。这个错误估计是因为要用melpa路径里面的资源编译el文件,但是因为在中国不能很好地用github下载所以无法完成编译
- 自己 build emacs 24.5
- centos emacs build gsettings error
- emacs 自己常用命令
- 【积水成渊-逐步定制自己的Emacs神器】1:Emacs入门
- sublime自己写build System
- 重新开始自己的emacs之旅。。
- 怎样用Visual Build工具搭建自己的Daily Build环境
- emacs...
- emacs
- ~/.emacs
- .emacs
- emacs
- emacs
- emacs
- Emacs
- emacs
- emacs
- Emacs
- 在Eclipse里配置tomcat图片路径
- Java8 Lambda表达式教程
- mac下eclipse配置tomcat
- spring集成web socket小demo(demo1)
- # Software-eng lab 2
- 自己 build emacs 24.5
- Postfix 小技巧和故障诊断命令
- LintCode 翻转链表
- 搜索引擎优化中会犯的错
- 功能: 正则表达式应用验证登录(C#学习日记 2017-09-22)
- 禁止在 .NET Framework 中执行用户代码。启用 "clr enabled" 配置选项
- mysql数据库学习(1)
- linux下C实现多线程
- mysql 1118 Row size too large 错误