现在的位置: 首页 > 综合 > 正文

ubuntu 安装emacs全过程(2)

2013年09月18日 ⁄ 综合 ⁄ 共 13718字 ⁄ 字号 评论关闭

之前用国一种方法,但是觉得这种方法更简单更直接,贡献出来。

You need to enable both universe & multiverse in /etc/apt/sources.list. From a prompt, run

Code:
sudo nano -Bw /etc/apt/sources.list

Then, remove the # in front of all the lines with deb at the beginning. Save and exit with <Ctrl>o and <Ctrl>x. Now, see if you can install emacs again.

Code:
sudo aptitude update
sudo aptitude install emacs

tangshuang@tangshuang-desktop:~$ sudo aptitude update
[sudo] password for tangshuang:
正在编辑扩展状态信息... 完成
忽略 cdrom://Ubuntu 9.04 _Jaunty Jackalope_ - Release i386 (20090420.1) jaunty Release.gpg
忽略 cdrom://Ubuntu 9.04 _Jaunty Jackalope_ - Release i386 (20090420.1) jaunty/main Translation-zh_CN
忽略 cdrom://Ubuntu 9.04 _Jaunty Jackalope_ - Release i386 (20090420.1) jaunty/restricted Translation-zh_CN
忽略 cdrom://Ubuntu 9.04 _Jaunty Jackalope_ - Release i386 (20090420.1) jaunty Release
忽略 cdrom://Ubuntu 9.04 _Jaunty Jackalope_ - Release i386 (20090420.1) jaunty/main Packages
忽略 cdrom://Ubuntu 9.04 _Jaunty Jackalope_ - Release i386 (20090420.1) jaunty/restricted Packages
忽略 cdrom://Ubuntu 9.04 _Jaunty Jackalope_ - Release i386 (20090420.1) jaunty/main Packages
忽略 cdrom://Ubuntu 9.04 _Jaunty Jackalope_ - Release i386 (20090420.1) jaunty/restricted Packages
错误 cdrom://Ubuntu 9.04 _Jaunty Jackalope_ - Release i386 (20090420.1) jaunty/main Packages
请使用 apt-cdrom,通过它就可以让 APT 能识别该光盘。apt-get upgdate 不能被用来加入新的光盘。
错误 cdrom://Ubuntu 9.04 _Jaunty Jackalope_ - Release i386 (20090420.1) jaunty/restricted Packages
请使用 apt-cdrom,通过它就可以让 APT 能识别该光盘。apt-get upgdate 不能被用来加入新的光盘。
命中 http://cn.archive.ubuntu.com jaunty Release.gpg                           
命中 http://cn.archive.ubuntu.com jaunty/main Translation-zh_CN                
命中 http://cn.archive.ubuntu.com jaunty/restricted Translation-zh_CN          
命中 http://cn.archive.ubuntu.com jaunty/universe Translation-zh_CN            
命中 http://cn.archive.ubuntu.com jaunty/multiverse Translation-zh_CN          
命中 http://cn.archive.ubuntu.com jaunty-updates Release.gpg                   
忽略 http://cn.archive.ubuntu.com jaunty-updates/main Translation-zh_CN        
忽略 http://cn.archive.ubuntu.com jaunty-updates/restricted Translation-zh_CN  
忽略 http://cn.archive.ubuntu.com jaunty-updates/universe Translation-zh_CN    
忽略 http://cn.archive.ubuntu.com jaunty-updates/multiverse Translation-zh_CN  
读取:1 http://cn.archive.ubuntu.com jaunty-backports Release.gpg [189B]       
忽略 http://cn.archive.ubuntu.com jaunty-backports/main Translation-zh_CN      
忽略 http://cn.archive.ubuntu.com jaunty-backports/restricted Translation-zh_CN
忽略 http://cn.archive.ubuntu.com jaunty-backports/universe Translation-zh_CN  
忽略 http://cn.archive.ubuntu.com jaunty-backports/multiverse Translation-zh_CN
命中 http://cn.archive.ubuntu.com jaunty Release                               
命中 http://cn.archive.ubuntu.com jaunty-updates Release                       
读取:2 http://cn.archive.ubuntu.com jaunty-backports Release [49.6kB]         
命中 http://cn.archive.ubuntu.com jaunty/main Packages                         
命中 http://cn.archive.ubuntu.com jaunty/restricted Packages                   
命中 http://cn.archive.ubuntu.com jaunty/main Sources                          
命中 http://cn.archive.ubuntu.com jaunty/restricted Sources                    
命中 http://cn.archive.ubuntu.com jaunty/universe Packages                     
命中 http://cn.archive.ubuntu.com jaunty/universe Sources                      
命中 http://cn.archive.ubuntu.com jaunty/multiverse Packages                   
命中 http://cn.archive.ubuntu.com jaunty/multiverse Sources                    
命中 http://cn.archive.ubuntu.com jaunty-updates/main Packages                 
命中 http://cn.archive.ubuntu.com jaunty-updates/restricted Packages           
命中 http://cn.archive.ubuntu.com jaunty-updates/main Sources                  
命中 http://cn.archive.ubuntu.com jaunty-updates/restricted Sources            
命中 http://cn.archive.ubuntu.com jaunty-updates/universe Packages             
命中 http://cn.archive.ubuntu.com jaunty-updates/universe Sources              
命中 http://cn.archive.ubuntu.com jaunty-updates/multiverse Packages           
命中 http://cn.archive.ubuntu.com jaunty-updates/multiverse Sources            
读取:3 http://cn.archive.ubuntu.com jaunty-backports/main Packages [56.3kB]   
读取:4 http://cn.archive.ubuntu.com jaunty-backports/restricted Packages [14B]
读取:5 http://cn.archive.ubuntu.com jaunty-backports/universe Packages [21.4kB]
读取:6 http://archive.canonical.com jaunty Release.gpg [189B]                 
忽略 http://archive.canonical.com jaunty/partner Translation-zh_CN             
读取:7 http://cn.archive.ubuntu.com jaunty-backports/multiverse Packages [14B]
读取:8 http://cn.archive.ubuntu.com jaunty-backports/main Sources [11.1kB]    
读取:9 http://cn.archive.ubuntu.com jaunty-backports/restricted Sources [14B]
读取:10 http://cn.archive.ubuntu.com jaunty-backports/universe Sources [4566B]
读取:11 http://cn.archive.ubuntu.com jaunty-backports/multiverse Sources [14B]
命中 http://security.ubuntu.com jaunty-security Release.gpg                    
忽略 http://security.ubuntu.com jaunty-security/main Translation-zh_CN
读取:12 http://archive.canonical.com jaunty Release [10.5kB]    
忽略 http://security.ubuntu.com jaunty-security/restricted Translation-zh_CN
忽略 http://security.ubuntu.com jaunty-security/universe Translation-zh_CN
忽略 http://security.ubuntu.com jaunty-security/multiverse Translation-zh_CN
命中 http://security.ubuntu.com jaunty-security Release
命中 http://security.ubuntu.com jaunty-security/main Packages
命中 http://security.ubuntu.com jaunty-security/restricted Packages            
命中 http://security.ubuntu.com jaunty-security/main Sources                   
读取:13 http://archive.canonical.com jaunty/partner Packages [3320B]          
命中 http://security.ubuntu.com jaunty-security/restricted Sources             
命中 http://security.ubuntu.com jaunty-security/universe Packages              
命中 http://security.ubuntu.com jaunty-security/universe Sources               
命中 http://security.ubuntu.com jaunty-security/multiverse Packages            
命中 http://security.ubuntu.com jaunty-security/multiverse Sources             
读取:14 http://archive.canonical.com jaunty/partner Sources [1555B]           
已下载 159kB,耗时 7s (20.5kB/s)                                               
正在读取软件包列表... 完成    

当前状态:1 个被更新 [+1], 15 个新软件包 [+15]。
tangshuang@tangshuang-desktop:~$ sudo aptitude install emacs
正在读取软件包列表... 完成
正在分析软件包的依赖关系树      
正在读取状态信息... 完成      
正在读取扩展状态文件      
正在初始化软件包状态... 完成
下列“新”软件包将被安装。
emacs emacs22-bin-common{a} emacs22-common{a} emacs22-gtk{a}
emacsen-common{a}
下列软件包将被“删除”:
linux-headers-2.6.28-11{u} linux-headers-2.6.28-11-generic{u}
下列仅部分安装的软件包将被配置:
linux-generic linux-headers-2.6.28-15-generic linux-headers-generic
linux-image-2.6.28-15-generic linux-image-generic
linux-restricted-modules-2.6.28-15-generic
linux-restricted-modules-generic
0 个软件包被升级,新安装 5 个, 2 个将被删除, 同时 1 个将不升级。
需要获取 21.0MB 的存档。 解包后将释放 9003kB。
您要继续吗?[Y/n/?] y
正在编辑扩展状态信息... 完成
读取:1 http://cn.archive.ubuntu.com jaunty/main emacsen-common 1.4.17 [17.6kB]
读取:2 http://cn.archive.ubuntu.com jaunty/main emacs22-common 22.2-0ubuntu2 [18.8MB]
读取:3 http://cn.archive.ubuntu.com jaunty/main emacs22-bin-common 22.2-0ubuntu2 [168kB]
读取:4 http://cn.archive.ubuntu.com jaunty/universe emacs22-gtk 22.2-0ubuntu2 [1980kB]
读取:5 http://cn.archive.ubuntu.com jaunty/main emacs 22.2-0ubuntu2 [6362B]   
已下载 21.0MB,耗时 2min 30s (139kB/s)                                         
(正在读取数据库 ... 系统当前总共安装有 119521 个文件和目录。)
正在删除 linux-headers-2.6.28-11-generic ...
正在删除 linux-headers-2.6.28-11 ...
选中了曾被取消选择的软件包 emacsen-common。
(正在读取数据库 ... 系统当前总共安装有 103220 个文件和目录。)
正在解压缩 emacsen-common (从 .../emacsen-common_1.4.17_all.deb) ...
选中了曾被取消选择的软件包 emacs22-common。
正在解压缩 emacs22-common (从 .../emacs22-common_22.2-0ubuntu2_all.deb) ...
选中了曾被取消选择的软件包 emacs22-bin-common。
正在解压缩 emacs22-bin-common (从 .../emacs22-bin-common_22.2-0ubuntu2_i386.deb) ...
选中了曾被取消选择的软件包 emacs22-gtk。
正在解压缩 emacs22-gtk (从 .../emacs22-gtk_22.2-0ubuntu2_i386.deb) ...
选中了曾被取消选择的软件包 emacs。
正在解压缩 emacs (从 .../emacs_22.2-0ubuntu2_all.deb) ...
正在处理用于 man-db 的触发器...
正在设置 linux-image-2.6.28-15-generic (2.6.28-15.49) ...
Running depmod.
update-initramfs: Generating /boot/initrd.img-2.6.28-15-generic
Running postinst hook script /sbin/update-grub.
Searching for GRUB installation directory ... found: /boot/grub
Searching for default file ... found: /boot/grub/default
Testing for an existing GRUB menu.lst file ... found: /boot/grub/menu.lst
Searching for splash image ... none found, skipping ...
Found kernel: /vmlinuz-2.6.28-15-generic
Found kernel: /vmlinuz-2.6.28-11-generic
Found kernel: /memtest86+.bin
Updating /boot/grub/menu.lst ... done

Examining /etc/kernel/postinst.d.
run-parts: executing /etc/kernel/postinst.d/nvidia-common
run-parts: /etc/kernel/postinst.d/nvidia-common exited with return code 10
Failed to process /etc/kernel/postinst.d at /var/lib/dpkg/info/linux-image-2.6.28-15-generic.postinst line 1002.
dpkg:处理 linux-image-2.6.28-15-generic (--configure)时出错:
子进程 post-installation script 返回了错误号 2
dpkg:依赖关系问题使得 linux-restricted-modules-2.6.28-15-generic 的配置工作不能继续:
linux-restricted-modules-2.6.28-15-generic 依赖于 linux-image-2.6.28-15-generic;然而:
软件包 linux-image-2.6.28-15-generic 还没有被配置。
dpkg:处理 linux-restricted-modules-2.6.28-15-generic (--configure)时出错:
依赖关系问题 - 仍未被配置
dpkg:依赖关系问题使得 linux-image-generic 的配置工作不能继续:
linux-image-generic 依赖于 linux-image-2.6.28-15-generic;然而:
软件包 linux-image-2.6.28-15-generic 还没有被配置。
dpkg:处理 linux-image-generic (--configure)时出错:
依赖关系问题 - 仍未被配置
dpkg:依赖关系问题使得 linux-restricted-modules-generic 的配置工作不能继续:
linux-restricted-modules-generic 依赖于 linux-restricted-modules-2.6.28-15-generic;然而:
软件包 linux-restricted-modules-2.6.28-15-generic 还没有被配置。
dpkg:处理 linux-restricted-modNo apport report written because the error message indicates its a followup error from a previous failure.
No apport report written because the error message indicates its a followup error from a previous failure.
No apport report written because MaxReports is reached already
No apport report written because MaxReports is reached already
ules-generic (--configure)时出错:
依赖关系问题 - 仍未被配置
dpkg:依赖关系问题使得 linux-generic 的配置工作不能继续:
linux-generic 依赖于 linux-image-generic (= 2.6.28.15.20);然而:
软件包 linux-image-generic 还没有被配置。
linux-generic 依赖于 linux-restricted-modules-generic (= 2.6.28.15.20);然而:
软件包 linux-restricted-modules-generic 还没有被配置。
dpkg:处理 linux-generic (--configure)时出错:
依赖关系问题 - 仍未被配置
正在设置 linux-headers-2.6.28-15-generic (2.6.28-15.49) ...
Examining /etc/kernel/header_postinst.d.
run-parts: executing /etc/kernel/header_postinst.d/nvidia-common
run-parts: /etc/kernel/header_postinst.d/nvidia-common exited with return code 10
Failed to process /etc/kernel/header_postinst.d at /var/lib/dpkg/info/linux-headers-2.6.28-15-generic.postinst line 110.
dpkg:处理 linux-headers-2.6.28-15-generic (--configure)时出错:
子进程 post-installation script 返回了错误号 2
dpkg:依赖关系问题使得 linux-headers-generic 的配置工作不能继续:
linux-headers-generic 依赖于 linux-headers-2.6.28-15-generic;然而:
软件包 linux-headers-2.6.28-15-generic 还没有被配置。
dpkg:处理 linux-headers-generic (--configure)时出错:
依赖关系问题 - 仍未被配置
正在设置 emacsen-common (1.4.17) ...
No apport report written because MaxReports is reached already
No apport report written because MaxReports is reached already
emacsen-common: Handling install of emacsen flavor emacs

正在设置 emacs22-common (22.2-0ubuntu2) ...

正在设置 emacs22-bin-common (22.2-0ubuntu2) ...

正在设置 emacs22-gtk (22.2-0ubuntu2) ...
Byte-compiling add-on packages, please wait... done.

正在设置 emacs (22.2-0ubuntu2) ...
在处理时有错误发生:
linux-image-2.6.28-15-generic
linux-restricted-modules-2.6.28-15-generic
linux-image-generic
linux-restricted-modules-generic
linux-generic
linux-headers-2.6.28-15-generic
linux-headers-generic
E: Sub-process /usr/bin/dpkg returned an error code (1)
软件包安装失败。正在试图恢复:
正在设置 linux-headers-2.6.28-15-generic (2.6.28-15.49) ...
Examining /etc/kernel/header_postinst.d.
run-parts: executing /etc/kernel/header_postinst.d/nvidia-common
run-parts: /etc/kernel/header_postinst.d/nvidia-common exited with return code 10
Failed to process /etc/kernel/header_postinst.d at /var/lib/dpkg/info/linux-headers-2.6.28-15-generic.postinst line 110.
dpkg:处理 linux-headers-2.6.28-15-generic (--configure)时出错:
子进程 post-installation script 返回了错误号 2
正在设置 linux-image-2.6.28-15-generic (2.6.28-15.49) ...
Running depmod.
update-initramfs: Generating /boot/initrd.img-2.6.28-15-generic
Running postinst hook script /sbin/update-grub.
Searching for GRUB installation directory ... found: /boot/grub
Searching for default file ... found: /boot/grub/default
Testing for an existing GRUB menu.lst file ... found: /boot/grub/menu.lst
Searching for splash image ... none found, skipping ...
Found kernel: /vmlinuz-2.6.28-15-generic
Found kernel: /vmlinuz-2.6.28-11-generic
Found kernel: /memtest86+.bin
Updating /boot/grub/menu.lst ... done

Examining /etc/kernel/postinst.d.
run-parts: executing /etc/kernel/postinst.d/nvidia-common
run-parts: /etc/kernel/postinst.d/nvidia-common exited with return code 10
Failed to process /etc/kernel/postinst.d at /var/lib/dpkg/info/linux-image-2.6.28-15-generic.postinst line 1002.
dpkg:处理 linux-image-2.6.28-15-generic (--configure)时出错:
子进程 post-installation script 返回了错误号 2
dpkg:依赖关系问题使得 linux-headers-generic 的配置工作不能继续:
linux-headers-generic 依赖于 linux-headers-2.6.28-15-generic;然而:
软件包 linux-headers-2.6.28-15-generic 还没有被配置。
dpkg:处理 linux-headers-generic (--configure)时出错:
依赖关系问题 - 仍未被配置
dpkg:依赖关系问题使得 linux-restricted-modules-2.6.28-15-generic 的配置工作不能继续:
linux-restricted-modules-2.6.28-15-generic 依赖于 linux-image-2.6.28-15-generic;然而:
软件包 linux-image-2.6.28-15-generic 还没有被配置。
dpkg:处理 linux-restricted-modules-2.6.28-15-generic (--configure)时出错:
依赖关系问题 - 仍未被配置
dpkg:依赖关系问题使得 linux-image-generic 的配置工作不能继续:
linux-image-generic 依赖于 linux-image-2.6.28-15-generic;然而:
软件包 linux-image-2.6.28-15-generic 还没有被配置。
dpkg:处理 linux-image-generic (--configure)时出错:
依赖关系问题 - 仍未被配置
dpkg:依赖关系问题使得 linux-restricted-modules-generic 的配置工作不能继续:
linux-restricted-modules-generic 依赖于 linux-restricted-modules-2.6.28-15-generic;然而:
软件包 linux-restricted-modules-2.6.28-15-generic 还没有被配置。
dpkg:处理 linux-restricted-modules-generic (--configure)时出错:
依赖关系问题 - 仍未被配置
dpkg:依赖关系问题使得 linux-generic 的配置工作不能继续:
linux-generic 依赖于 linux-image-generic (= 2.6.28.15.20);然而:
软件包 linux-image-generic 还没有被配置。
linux-generic 依赖于 linux-restricted-modules-generic (= 2.6.28.15.20);然而:
软件包 linux-restricted-modules-generic 还没有被配置。
dpkg:处理 linux-generic (--configure)时出错:
依赖关系问题 - 仍未被配置
在处理时有错误发生:
linux-headers-2.6.28-15-generic
linux-image-2.6.28-15-generic
linux-headers-generic
linux-restricted-modules-2.6.28-15-generic
linux-image-generic
linux-restricted-modules-generic
linux-generic
正在读取软件包列表... 完成    
正在分析软件包的依赖关系树      
正在读取状态信息... 完成      
正在读取扩展状态文件     
正在初始化软件包状态... 完成
正在编辑扩展状态信息... 完成

tangshuang@tangshuang-desktop:~$

抱歉!评论已关闭.