Debian: パッケージのダウンロード元指定(DVD->Web) – sources.list


root@debian:~# apt-get install vim
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
Suggested packages:
  ctags vim-doc vim-scripts
The following NEW packages will be installed:
  vim vim-runtime
0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/7,122 kB of archives.
After this operation, 27.8 MB of additional disk space will be used.
Do you want to continue [Y/n]? Y
Media change: please insert the disc labeled
 'Debian GNU/Linux 6.0.5 _Squeeze_ - Official amd64 DVD Binary-1 20120512-14:34'
in the drive '/media/cdrom/' and press enter


vi /etc/apt/sources.list
# ↓下記の行をコメントアウトすることで、CD, DVDへの読み込みを回避
# deb cdrom:[Debian GNU/Linux 6.0.5 _Squeeze_ - Official amd64 DVD Binary-1 20120512-14:34]/ squeeze contrib main
deb squeeze main
deb-src squeeze main
deb squeeze/updates main contrib
deb-src squeeze/updates main contrib
# squeeze-updates, previously known as 'volatile'
deb squeeze-updates main contrib
deb-src squeeze-updates main contrib