修復 Debian 8.2系統於 apt-get 安裝時發生錯誤: “Media change: please insert the disc labeled ...”

 

為了避免Debian在安裝軟件時,向並不存在的光盤CDROM進行搜尋,您可以在/etc/apt/sources.list文件上更改一個簡單的參數

如果在使用apt-get安裝時得到這樣的輸出,則需要修改上述文件

 

Media change: please insert the disc labeled
 'Debian GNU/Linux 7.0.0 _Wheezy_ - Official amd64 CD Binary-1 20130504-14:44'
in the drive '/media/cdrom/' and press enter

 

打開並修改 /etc/apt/sources.list 文件:

vi /etc/apt/sources.list

 

您會看到下列文件內容:

#

deb cdrom:[Debian GNU/Linux 7.0.0 _Wheezy_ - Official amd64 CD Binary-1 20130504-14:44]/ wheezy main

deb http://ftp.us.debian.org/debian/ wheezy main
deb-src http://ftp.us.debian.org/debian/ wheezy main

deb http://security.debian.org/ wheezy/updates main
deb-src http://security.debian.org/ wheezy/updates main

# wheezy-updates, previously known as 'volatile'
deb http://ftp.us.debian.org/debian/ wheezy-updates main
deb-src http://ftp.us.debian.org/debian/ wheezy-updates main
~

 

這文件會顯示所以可用的安裝包來源,但您會看到  deb cdrom:[Debian GNU/Linux 7.0.0 _Wheezy_ - Official amd64 CD Binary-1 20130504-14:44]/ wheezy main 光盤的安裝包來源數據也在其中.

由於光盤安裝包的數據是不存在的請在前面加上 # 記號並儲存檔案.

 

應該改成下列文件內容:

 

#

# deb cdrom:[Debian GNU/Linux 7.0.0 _Wheezy_ - Official amd64 CD Binary-1 20130504-14:44]/ wheezy main

deb http://ftp.us.debian.org/debian/ wheezy main
deb-src http://ftp.us.debian.org/debian/ wheezy main

deb http://security.debian.org/ wheezy/updates main
deb-src http://security.debian.org/ wheezy/updates main

# wheezy-updates, previously known as 'volatile'
deb http://ftp.us.debian.org/debian/ wheezy-updates main
deb-src http://ftp.us.debian.org/debian/ wheezy-updates main
~

 

 

  • 6 utilizatori au considerat informaţia utilă
Răspunsul a fost util?

Related Articles

Debain9 部屬 docker 並開啟原生BBR 對接簡易教程(by PQS皮老板)

//由PQS皮老板整理 //直接啟用原版BBR echo "net.core.default_qdisc=fq" >> /etc/sysctl.conf...

自建DDNS配置教程(Cloudflare支持中國大陸主機)

Cloudflare DDNS 腳本     1- 先至cloudflare 建立一個域名...

CentOS 7 關閉防火牆及 SELinux

CentOS 7 的 SELinux 及 Firewalld 防火牆都是安全相關的套件, RHEL 及 CentOS 均預設開啟, 但如果在開發或測試的機器上, 將它們關閉對除錯方便不少。...

自建DDNS配置教程(dynu不支持中國大陸主機)

众所周知,动态IP的一个特点就是在IP被墙的时候可以及时更换,情况好的时候,两三天都不会换一次,但是当情况不好的时候,一天换两三次也是可能的。但是每次进官网获取最新的IP也很麻烦。所以我们在动态...

全系列动态VDS更改IP API

全系列动态VDS更改IP API上线了,请到后台获取API网址,自行加入监测脚本可运行API换IP。 使用pqsapi脚本: 1.用大陆国内机器 2.先安装nmap nscd curl...