CDの代わりにインターネット経由でDebianパッケージをインストールする方法は?

CDの代わりにインターネット経由でDebianパッケージをインストールする方法は?

sudoをインストールするためにDebianテストにrootと入力するときは、次のように入力します。

apt-get install sudo

次を返します。

Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following NEW packages will be installed:
  sudo
0 upgraded, 1 newly installed, 0 to remove and 1 not upgraded.
Need to get 0 B/920 kB of archives.
After this operation, 2,895 kB of additional disk space will be used.
Media change: please insert the disc labeled
 'Debian GNU/Linux testing _Stretch_ - Official Snapshot amd64 xfce-CDBinary-1 20150518-05:36'
in the drive '/media/cdrom/' and press enter

インターネット経由でDebianにsudoをインストールするにはどうすればよいですか?

ベストアンサー1

apt-get(他のすべてのAPTベースのソフトウェアと同様に、aptitude、synapticなど)ファイルに記載されている場所でパッケージを見つけます。/etc/apt/sources.list。また、ディレクトリ内のファイルが使用されます/etc/apt/sources.list.d(名前が「異常でない」場合)。

ファイルを編集して/etc/apt/sources.listDebian CDを参照する行を削除またはコメントアウトします。行をコメントアウトするには、#先頭にこの文字を追加します。このファイルを編集するには、ルートである必要があります。 nanoを使用している場合は、単語の改行によって誤って改行文字が挿入されないようにしてください(実行するnano -w /etc/apt/sources.listAlt+を押してL単語の改行を無効にしてください)。

インターネットパッケージソースが必要です。インストール中に選択したオプションによっては、そのオプションがすでに存在する場合と存在しない場合があります。存在してもCDを参照する行がある場合は、CDにあるパッケージよりもCDが優先されます。

以下は、ネットワークリソースのいくつかの一般的な行です。次ftp.fr.debian.orgへ交換あなたの隣に。

## Debian testing proper
deb http://ftp.fr.debian.org/debian stretch main non-free contrib
deb-src http://ftp.fr.debian.org/debian stretch main non-free contrib

## Security updates
deb http://security.debian.org/ stretch/updates main contrib non-free
deb-src http://security.debian.org/ stretch/updates main contrib non-free

## Other updates
deb http://ftp.fr.debian.org/debian stretch/updates main non-free contrib
deb-src http://ftp.fr.debian.org/debian stretch/updates main non-free contrib

ファイルを編集したらsources.list(root)コマンドを実行します。

apt-get update

これで、インターネットからパッケージをインストールできます。

おすすめ記事