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

出現上圖說明安裝成功了

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM