与Ubuntu不同,使用 [codesyntax lang="php"]

apt-get install packages

[/codesyntax] 时 Debian可能会提示:

[codesyntax lang="php"]

Media change: please insert the disc labeled
 'Debian GNU/Linux 8.2.0 _Jessie_ - Official amd64 CD Binary-1 20150906-11:13'
in the drive '/media/cdrom/' and press enter

[/codesyntax]

也就是要求插入Debian光盘来离线安装软件包。

我们可以通过修改 source.list 文件可以修改安装方式:

[codesyntax lang="php"]

vim /etc/apt/source.list

[/codesyntax]

特么的,使用VIM命令时提示需要安装VIM命令。

现在安装VIM

[codesyntax lang="php"]

apt-get install vim

[/codesyntax]

等你安装VIM命令时,还是提示插入Debian光盘。

我们输入 [codesyntax lang="php"]

vi /etc/apt/sources.list

[/codesyntax]

再有cdroom 那一行的行首添加 # ,注释掉

[codesyntax lang="php"]

#
# deb cdrom:[Debian GNU/Linux 8.6.0 _Jessie_ - Official amd64 DVD Binary-1 20160917-14:25]/ jessie contrib main
deb cdrom:[Debian GNU/Linux 8.6.0 _Jessie_ - Official amd64 DVD Binary-1 20160917-14:25]/ jessie contrib main
deb http://debian.ustc.edu.cn/debian/ jessie main
deb-src http://debian.ustc.edu.cn/debian/ jessie main
deb http://security.debian.org/ jessie/updates main contrib
deb-src http://security.debian.org/ jessie/updates main contrib
# jessie-updates, previously known as 'volatile'
deb http://debian.ustc.edu.cn/debian/ jessie-updates main contrib
deb-src http://debian.ustc.edu.cn/debian/ jessie-updates main contrib

[/codesyntax]

现在通过 apt-get 安装软件,就会通过网源安装软件了。