由於有朋友問我這個問題,因此我就實踐一下,寫了下來.
1, 在其它能上網的電腦上面下載 emacs :
http://www.gnu.org/software/emacs/emacs.html html
- wget -c http://ftp.gnu.org/pub/gnu/emacs/emacs-23.2.tar.gz
- 82% [===============================> ] 38,794,237 438K/s ETA 23s
2, 解壓
tar -xf emacs-23.2.tar.gz
cd emacs-23.2
3,看 README , 再看 INSTALL
INSTALL 裏面寫着:
ubuntu
- 1. Make sure your system has at least 120 MB of free disk space.
- 2a. `cd' to the directory where you unpacked Emacs and invoke the
- `configure' script:
- ./configure
- 2b. Alternatively, create a separate directory, outside the source
- directory, where you want to build Emacs, and invoke `configure'
- from there:
- SOURCE-DIR/configure
- where SOURCE-DIR is the top-level Emacs source directory. This
- may not work unless you use GNU make.
- 3. When `configure' finishes, it prints several lines of details
- about the system configuration. Read those details carefully
- looking for anything suspicious, such as wrong CPU and operating
- system names, wrong places for headers or libraries, missing
- libraries that you know are installed on your system, etc.
- If you find anything wrong, you will have to pass to `configure'
- explicit machine configuration name, and one or more options
- which tell it where to find various headers and libraries; refer
- to DETAILED BUILDING AND INSTALLATION section below.
- If `configure' didn't find some image support libraries, such as
- Xpm, jpeg, etc., and you want to use them refer to the subsection
- "Image support libraries", below.
- If the details printed by `configure' don't make any sense to
- you, assume that `configure' did its job and proceed.
- 4. If you need to run the `configure' script more than once (e.g.,
- with some non-default options), always clean the source
- directories before running `configure' again:
- make distclean
- ./configure
- 5. Invoke the `make' program:
- make
- 6. If `make' succeeds, it will build an executable program `emacs'
- in the `src' directory. You can try this program, to make sure
- it works:
- src/emacs -q
- 7. Assuming that the program `src/emacs' starts and displays its
- opening screen, you can install the program and its auxiliary
- files into their installation directories:
- make install
- You are now ready to use Emacs. If you wish to conserve disk space,
- you may remove the program binaries and object files from the
- directory where you built Emacs:
- make clean
- You can also save some space by compressing (with `gzip') Info files
- and installed Lisp source (.el) files which have corresponding .elc
- versions.
4, 那就按他說的作吧:
kk@kk-laptop:~/down/emacs-23.2$ ./configure
提示:
less
- configure: error: The following required libraries were not found:
- libjpeg libpng libgif/libungif libtiff
- Maybe some development libraries/packages are missing?
- If you don't want to link with them give
- --with-jpeg=no --with-png=no --with-gif=no --with-tiff=no
- as options to configure
說這幾個庫沒找到: libjpeg libpng libgif/libungif libtiff
也說能夠跳過這幾個庫 命令是: ./configure --with-jpeg=no --with-png=no --with-gif=no --with-tiff=no
我是直接跳過了.
安裝這幾個庫: 用 aptitude search 命令查找 libjpeg :
- kk@kk-laptop:~/down/emacs-23.2$ aptitude search libjpeg
- v libjpeg-dbg -
- v libjpeg-dev -
- p libjpeg-progs - Programs for manipulating JPEG files
- i libjpeg62 - The Independent JPEG Group's JPEG runtime
- p libjpeg62-dbg - Development files for the IJG JPEG library
- p libjpeg62-dev - Development files for the IJG JPEG library
獲得答案: 要安裝 libjpeg-dev , 因而在其它電腦上面下載這個包, 命令 :
- aptitude install -d libjpeg-dev
-
- 讀取:1 http://cn.archive.ubuntu.com/ubuntu/ lucid/main libjpeg62-dev 6b-15ubuntu1 [188kB]
- 已下載 188kB,耗時 0秒 (284kB/s)
-
- cd /var/cache/apt/archives