ubuntu 安裝emacs全過程(2)

來源:互聯網
上載者:User

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

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

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.