ubuntu 安裝emacs全過程(2)

之前用國一種方法,但是覺得這種方法更簡單更直接,貢獻出來。

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:~$

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章