Ubuntu安裝Emacs出現到依賴問題及解決方案

來源:互聯網
上載者:User

Ubuntu安裝Emacs出現到依賴問題及解決方案

Ubuntu軟體中心emacs的版本是23,自己在網上下了最新版24.3,通過編譯安裝到時候遇到來很多依賴問題,下面將這些問題整理了出來:

1.執行./configure命令出現如下錯誤:
 
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+, 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.
 
根據提示是缺少X windows系統的開發庫。如果不想在圖形介面下使用Emacs,可以使用--without-x選項進行編譯(廢話),那麼只有把GTK+安裝上才能通過configure了。
 
sudo apt-get install libgtk2.0-dev

2.在configure中增加編譯選項,./configure --with-x-toolkit=gtk3,這次配置未提示上述錯誤,但又出現下面錯誤:
 
The following required libraries were not found:
    libXpm libjpeg libgif/libungif libtiff
 Maybe some development libraries/packages are missing?
 If you don't want to link with them give
    --with-xpm=no --with-jpeg=no --with-gif=no --with-tiff=no
 as options to configure
 
提示缺少libXpm libjpeg libgif/libungif libtiff
 
幾個映像開發庫也要裝上
 
sudo apt-get install libxpm-dev
sudo apt-get install libjpeg62-dev
sudo apt-get install libgif-dev
sudo apt-get install libtiff4-dev


3.利用apt-get install 將上述缺少的包及其開發包安裝後,繼續./configure,還有錯誤:
 
configure: error: The required function `tputs' was not found in any library.
 These libraries were tried: libncurses, libterminfo, libtermcap, libcurses.
 Please try installing whichever of these libraries is most appropriate
 for your system, together with its header files.
 For example, a libncurses-dev(el) or similar package.
 
提示缺少必須的函數'tputs',有可能在libncurses-dev中,那麼嘗試安裝這個包,再configure
 
4.因為前面編譯過,所以運行make clean && make distclean來清理一下
 

5.再通過./configure,終端有如下提示:
 
configure: creating ./config.status
 config.status: creating Makefile
 config.status: creating lib/Makefile
 config.status: creating lib-src/Makefile
 config.status: creating oldXMenu/Makefile
 config.status: creating doc/emacs/Makefile
 config.status: creating doc/misc/Makefile
 config.status: creating doc/lispintro/Makefile
 config.status: creating doc/lispref/Makefile
 config.status: creating src/Makefile
 config.status: creating lwlib/Makefile
 config.status: creating lisp/Makefile
 config.status: creating leim/Makefile
 config.status: creating src/config.h
 config.status: executing depfiles commands
 config.status: executing mkdirs commands
 config.status: executing epaths commands
 creating src/epaths.h
 [ -r "/home/wkd/src/emacs-24.2/src/config.in" ] || ( cd /home/wkd/src/emacs-24.2 && autoheader )
 config.status: executing gdbinit commands
 
6.sudo make,sudo make install 安裝成功
整個編譯過程,主要是仔細查看configure的輸出,看缺乏哪些庫,只要把缺乏的庫安裝上,就能configure成功,這是關鍵。

為Emacs配置newLISP開發環境

手把手教你學會 Emacs 主題配置

Ubuntu下編譯安裝Emacs23 

手把手教你學會 Emacs 定製

如何在GNU Emacs環境下編譯並運行C/C++程式?

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.