ubuntu下面无网络的情况下安装 emacs

因为有朋友问我这个问题,所以我就实践一下,写了下来. 

1, 在其它能上网的电脑上面下载 emacs :
http://www.gnu.org/software/emacs/emacs.html

 

  1. wget -c http://ftp.gnu.org/pub/gnu/emacs/emacs-23.2.tar.gz  
  2. 82% [===============================>       ] 38,794,237   438K/s  ETA 23s       

 

2, 解压
tar -xf emacs-23.2.tar.gz
cd emacs-23.2


3,看 README , 再看 INSTALL


INSTALL 里面写着:

  1. 1. Make sure your system has at least 120 MB of free disk space.    
  2. 2a. `cd' to the directory where you unpacked Emacs and invoke the    
  3. `configure' script:    
  4. ./configure    
  5. 2b. Alternatively, create a separate directory, outside the source    
  6. directory, where you want to build Emacs, and invoke `configure'    
  7. from there:    
  8. SOURCE-DIR/configure    
  9. where SOURCE-DIR is the top-level Emacs source directory.  This    
  10. may not work unless you use GNU make.    
  11. 3. When `configure' finishes, it prints several lines of details    
  12. about the system configuration.  Read those details carefully    
  13. looking for anything suspicious, such as wrong CPU and operating    
  14. system names, wrong places for headers or libraries, missing    
  15. libraries that you know are installed on your system, etc.    
  16. If you find anything wrong, you will have to pass to `configure'    
  17. explicit machine configuration name, and one or more options    
  18. which tell it where to find various headers and libraries; refer    
  19. to DETAILED BUILDING AND INSTALLATION section below.    
  20. If `configure' didn't find some image support libraries, such as    
  21. Xpm, jpeg, etc., and you want to use them refer to the subsection    
  22. "Image support libraries", below.    
  23. If the details printed by `configure' don't make any sense to    
  24. you, assume that `configure' did its job and proceed.    
  25. 4. If you need to run the `configure' script more than once (e.g.,    
  26. with some non-default options), always clean the source    
  27. directories before running `configure' again:    
  28. make distclean    
  29. ./configure    
  30. 5. Invoke the `make' program:    
  31. make    
  32. 6. If `make' succeeds, it will build an executable program `emacs'    
  33. in the `src' directory.  You can try this program, to make sure    
  34. it works:    
  35. src/emacs -q    
  36. 7. Assuming that the program `src/emacs' starts and displays its    
  37. opening screen, you can install the program and its auxiliary    
  38. files into their installation directories:    
  39. make install    
  40. You are now ready to use Emacs.  If you wish to conserve disk space,    
  41. you may remove the program binaries and object files from the    
  42. directory where you built Emacs:    
  43. make clean    
  44. You can also save some space by compressing (with `gzip') Info files    
  45. and installed Lisp source (.el) files which have corresponding .elc    
  46. versions.    



4, 那就按他说的做吧:


kk@kk-laptop:~/down/emacs-23.2$ ./configure 

提示:

  1. configure: error: The following required libraries were not found:    
  2. libjpeg libpng libgif/libungif libtiff    
  3. Maybe some development libraries/packages are missing?    
  4. If you don't want to link with them give    
  5. --with-jpeg=no --with-png=no --with-gif=no --with-tiff=no    
  6. 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 : 

  1. kk@kk-laptop:~/down/emacs-23.2$ aptitude search libjpeg    
  2. v   libjpeg-dbg                     -                                               
  3. v   libjpeg-dev                     -                                               
  4. p   libjpeg-progs                   - Programs for manipulating JPEG files          
  5. i   libjpeg62                       - The Independent JPEG Group's JPEG runtime     
  6. p   libjpeg62-dbg                   - Development files for the IJG JPEG library    
  7. p   libjpeg62-dev                   - Development files for the IJG JPEG library   



得到答案: 要安装 libjpeg-dev , 于是在其它电脑上面下载这个包, 命令 :


  1. aptitude install -d libjpeg-dev  
  2.   
  3. 读取:1 http://cn.archive.ubuntu.com/ubuntu/ lucid/main libjpeg62-dev 6b-15ubuntu1 [188kB]  
  4. 已下载 188kB,耗时 0秒 (284kB/s)  
  5.   
  6. cd /var/cache/apt/archives  
  7.   

转载于:https://my.oschina.net/sevk/blog/10297

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值