linux 源碼安裝emacs24.4


1、從官網下載源碼 emacs-24.4.tar.gz


2、解壓后,依照INSTALL進行安裝
3-1、生成配置文件

emacs-24.4$ ./configure

 

遇到的問題1:

configure: error: 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

解決辦法:
1)到 http://www.x.org/releases/current/src/lib/
下載 libXpm-3.5.10.tar.bz2
解壓后進入其根目錄並依次執行

libXpm-3.5.10$ ./configure
libXpm-3.5.10$ make
libXpm-3.5.10$ sudo make install


2)到 http://www.ijg.org/
下載 jpegsrc.v9a.tar.gz
解壓后進入其根目錄並依次執行

jpeg-9a$ ./configure
jpeg-9a$ make
jpeg-9a$ sudo make install

 

3)到 http://sourceforge.net/projects/giflib/
下載 giflib-5.1.0.tar.bz2
解壓后進入其根目錄並依次執行

giflib-5.1.0$ ./configure
giflib-5.1.0$ make
giflib-5.1.0$ sudo make install

 

4)到 http://download.osgeo.org/libtiff/
下載 tiff-4.0.3.tar.gz
解壓后進入其根目錄並依次執行

tiff-4.0.3$ ./configure
tiff-4.0.3$ make
tiff-4.0.3$ sudo make install

以上問題都解決后再次生成配置文件

emacs-24.4$ ./configure

 

4-1、編譯

emacs-24.4$ make

遇到的問題1:

./temacs: error while loading shared libraries: libtiff.so.5: cannot open shared object file: No such file or directory
make[1]: *** [bootstrap-emacs] Error 1

問題解決:
1)提示找不到libtiff,但我們之前已經安裝過了,這里查看一下其位置(發現在/usr/local/lib下)

$ whereis libtiff

libtiff: /usr/local/lib/libtiff.so /usr/local/lib/libtiff.la /usr/local/lib/libtiff.a

2)切換成root 用戶執行以下命令

# echo "/usr/local/lib" >> /etc/ld.so.conf
# ldconfig

這里說一下ldconfig的作用:其作用主要是在默認搜尋目錄(/lib和/usr/lib)以及動態庫配置文件/etc/ld.so.conf內所列的目錄下, 搜索出可共享的動態鏈接庫(格式如lib*.so*), 進而創建出動態裝入程序(ld.so)所需的連接和緩存文件。緩存文件默認為/etc/ld.so.cache,,此文件保存已排好序的動態鏈接庫名字列表。

4-2、繼續編譯

emacs-24.4$ make


5、安裝

emacs-24.4$ sudo make install


6、Enjoy it.


免責聲明!

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



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