欢迎来到Felix的博客

Do the right things! And talk is cheap,show me your code!

emacs源码安装

1、源码下载地址=》下载

选择下载的版本,我下的是emacs-26.1.tar.xz 版本

2、解压

xz -d emacs-26.1.tar.xz  # 解压成tar文件
tar -xvf emacs-26.1.tar # 解压

3、编译安装

./configure --prefix=/opt/emacs/

如果出现以下错误:

checking for libXaw... configure: error: No X toolkit could be found.
If you are sure you want Emacs compiled without an X toolkit, pass
  --with-x-toolkit=no
to configure.  Otherwise, install the development libraries for the toolkit
that you want to use (e.g. Gtk+) and re-run configure.

解决方案:

安装依赖:

sudo apt-get install build-essential texinfo libx11-dev libxpm-dev libjpeg-dev libpng-dev libgif-dev libtiff-dev libgtk2.0-dev libgtk-3-dev libncurses-dev libxpm-dev automake autoconf

如果出现以下错误:

configure: error: The following required libraries were not found:
     gnutls
Maybe some development libraries/packages are missing?
If you don't want to link with them give
     --with-gnutls=no
as options to configure

解决方案:

sudo apt-get install gnutls-dev

如果出现以下警告:

configure: WARNING: This configuration installs a 'movemail' program
that does not retrieve POP3 email.  By default, Emacs 25 and earlier
installed a 'movemail' program that retrieved POP3 email via only
insecure channels, a practice that is no longer recommended but that
you can continue to support by using './configure --with-pop'.
configure: You might want to install GNU Mailutils
<https://mailutils.org> and use './configure --with-mailutils'.

解决方案:

./configure --prefix=/opt/emacs/ --with-mailutils --with-pop

最后:

make && make install

添加软连接

ln -s /opt/emacs/bin/emacs /usr/bin/emacs

出现上图说明安装成功了

 

posted @ 2019-01-17 10:58  寂静的天空  阅读(3246)  评论(0编辑  收藏  举报
个人感悟: 一个人最好的镜子就是自己,你眼中的你和别人眼中的你,不是一回事。有人夸你,别信;有人骂你,别听。一根稻草,扔街上就是垃圾;捆上白菜就是白菜价;捆上大闸蟹就是大闸蟹的价。 一个人,不狂是没有出息的,但一直狂,肯定是没有出息的。雨打残花风卷流云,剑影刀光闪过后,你满脸冷酷的站在珠峰顶端,傲视苍生无比英武,此时我问你:你怎么下去? 改变自己就是改变自己的心态,该沉的时候沉下去,该浮的时候浮上来;不争名夺利,不投机取巧,不尔虞我诈;少说、多听、多行动。人每所谓穷通寿夭为命所系,岂不知造物之报施,全视人之自取。 座佑铭:每一个不曾起舞的日子,都是对生命的辜负。