操作系统和硬件:Lenovo G50-45 上的 Debian Jessie x64 cinnamon
我刚刚在朋友的笔记本电脑上安装了新的 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
答案1
造成这种情况的原因可能是您的软件源内容不正确。要补救它:
使用您最喜欢的编辑器编辑您的源代码,
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
软件,但是......