Debian
Debian Jessie 上的預設 sources.list(無法滿足的依賴項)
作業系統和硬體:聯想 G50-45 上的 Debian Jessie x64 肉桂
我剛剛在朋友的筆記型電腦上安裝了一個新的 Debian Jessie (Debian 8.7.1 x86_64 Cinnamon),我需要升級核心和一些東西,我在 #debian IRC 與這 3 人聊天中被引導到這些步驟為了使 WiFi 正常工作的軟體包:
linux-image-4.8.0-0.bpo.2-amd64_4.8.15-2~bpo8+2_amd64.deb linux-base_4.3~bpo8+1_all.deb firmwqare-atheros_20161130-2~bpo8+1_all.deb
我現在遇到的問題是我無法安裝任何東西。
我嘗試安裝的每個程序,甚至像 DosBox 這樣簡單的程序,都會給我關於無法滿足的依賴關係的錯誤。
這是什麼原因以及如何補救?
終端輸出日誌:
$ sudo apt-get install wine Reading package lists... Done Building dependency tree Reading state information... Done E: Unable to locate package wine $ sudo add-apt-repository ppa:ubuntu-wine/ppa sudo: add-apt-repository: command not found $ sudo apt-get update Ign cdrom://[Debian GNU/Linux 8 _Jessie_ - Official Snapshot amd64 LIVE/INSTALL Binary 20170117-02:05] jessie InRelease Ign cdrom://[Debian GNU/Linux 8 _Jessie_ - Official Snapshot amd64 LIVE/INSTALL Binary 20170117-02:05] jessie Release.gpg Ign cdrom://[Debian GNU/Linux 8 _Jessie_ - Official Snapshot amd64 LIVE/INSTALL Binary 20170117-02:05] jessie Release Ign cdrom://[Debian GNU/Linux 8 _Jessie_ - Official Snapshot amd64 LIVE/INSTALL Binary 20170117-02:05] jessie/contrib amd64 Packages/DiffIndex Ign cdrom://[Debian GNU/Linux 8 _Jessie_ - Official Snapshot amd64 LIVE/INSTALL Binary 20170117-02:05] jessie/main amd64 Packages/DiffIndex Ign cdrom://[Debian GNU/Linux 8 _Jessie_ - Official Snapshot amd64 LIVE/INSTALL Binary 20170117-02:05] jessie/non-free amd64 Packages/DiffIndex Ign cdrom://[Debian GNU/Linux 8 _Jessie_ - Official Snapshot amd64 LIVE/INSTALL Binary 20170117-02:05] jessie/contrib Translation-en_US Ign cdrom://[Debian GNU/Linux 8 _Jessie_ - Official Snapshot amd64 LIVE/INSTALL Binary 20170117-02:05] jessie/contrib Translation-en Ign cdrom://[Debian GNU/Linux 8 _Jessie_ - Official Snapshot amd64 LIVE/INSTALL Binary 20170117-02:05] jessie/main Translation-en_US Ign cdrom://[Debian GNU/Linux 8 _Jessie_ - Official Snapshot amd64 LIVE/INSTALL Binary 20170117-02:05] jessie/main Translation-en Ign cdrom://[Debian GNU/Linux 8 _Jessie_ - Official Snapshot amd64 LIVE/INSTALL Binary 20170117-02:05] jessie/non-free Translation-en_US Ign cdrom://[Debian GNU/Linux 8 _Jessie_ - Official Snapshot amd64 LIVE/INSTALL Binary 20170117-02:05] jessie/non-free Translation-en Reading package lists... Done $ sudo apt-get install software-properties-common Reading package lists... Done Building dependency tree Reading state information... Done E: Unable to locate package software-properties-common $ sudo apt-get install dosbox Reading package lists... Done Building dependency tree Reading state information... Done E: Unable to locate package dosbox $ sudo apt-get install python-software-properties Reading package lists... Done Building dependency tree Reading state information... Done Package python-software-properties is not available, but is referred to by another package. This may mean that the package is missing, has been obsoleted, or is only available from another source
造成這種情況的原因可能是您的軟體源內容不正確。補救措施:
- 使用您最喜歡的編輯器編輯您的來源,
nano
如果不確定,請使用:sudo nano /etc/apt/sources.list
- 註釋掉(用
#
)所有 CD 行。- 確保除了 CD 之外還有其他東西;
- 如果沒有其他內容,您可以複製粘貼以下完整列表:
deb http://httpredir.debian.org/debian jessie main contrib non-free deb-src http://httpredir.debian.org/debian jessie main contrib non-free deb http://httpredir.debian.org/debian jessie-updates main contrib non-free deb-src http://httpredir.debian.org/debian jessie-updates main contrib non-free deb http://security.debian.org/ jessie/updates main contrib non-free deb-src http://security.debian.org/ jessie/updates main contrib non-free
- 更新記憶體:
sudo apt-get update
- 安裝你需要的任何東西;)
考慮一些事情可能是明智的,即在這個答案中,這兩個:
- 如果不需要軟體源,可以省略
deb-src
行。這意味著,如果您目前不需要自己編譯任何軟體,則不需要這些行,但是因為它們不會造成傷害…- 如果您打算只使用純 GNU 自由軟體,您可以
non-free
從所有行中省略,如果不確定,或者對 Linux 不熟悉,您可能會想要一些non-free
軟體,但是…