欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

解決Ubuntu下apt-get update無法添加新的CD-ROM的問題

開源中文社區(qū)   發(fā)布時(shí)間:2015-06-03 18:00:08   作者:Abhishek   我要評(píng)論
這篇文章主要介紹了解決Ubuntu下apt-get update無法添加新的CD-ROM的問題,主要是從軟件源中移除cdrom的操作,需要的朋友可以參考下

這些天我正在體驗(yàn)Elementary OS Freya,在這期間,我遇到了一個(gè)非常常見的更新錯(cuò)誤:Failed to fetch cdrom Please use apt-cdrom to make this CD-ROM recognized by APT. apt-get update cannot be used to add new CD-ROMs。完整的錯(cuò)誤在運(yùn)行apt-get update后看上去像這樣:

   

復(fù)制代碼
代碼如下:
W: Failed to fetch cdrom://elementary OS 0.3 Freya – Daily amd64 (20150208)/dists/trusty/main/binary-amd64/Packages Please use apt-cdrom to make this CD-ROM recognized by APT. apt-get update cannot be used to add new CD-ROMs</p> <p> W: Failed to fetch cdrom://elementary OS 0.3 Freya – Daily amd64 (20150208)/dists/trusty/restricted/binary-amd64/Packages Please use apt-cdrom to make this CD-ROM recognized by APT. apt-get update cannot be used to add new CD-ROMs</p> <p> E: Some index files failed to download. They have been ignored, or old ones used instead.

本篇中,我們會(huì)了解如何修復(fù)這個(gè)錯(cuò)誤。
修復(fù)apt-get update無法添加新的CD-ROM的錯(cuò)誤

這個(gè)錯(cuò)誤的原因是cdrom已經(jīng)被包含在源之中。要修復(fù)這個(gè)問題,我們需要將它從軟件源中移除。

在Ubuntu中,找到“軟件與更新”:
201563180519871.jpg (512×220)

在Ubuntu Software的第一個(gè)標(biāo)簽中,找到cdrom,如果它是勾選的,那么取消勾選。
201563180541449.jpg (597×468)

關(guān)閉軟件源并再次運(yùn)行更新?,F(xiàn)在應(yīng)該可以用了。
進(jìn)一步故障排除:

上面描述的方法已經(jīng)修復(fù)了這個(gè)apt-get update cannot be used to add new CD-ROMs錯(cuò)誤。但是這個(gè)方法對我無效,因?yàn)閏drom的選項(xiàng)這時(shí)是灰色的,因?yàn)槲沂褂玫膌ive版本。
201563180601359.png (503×406)

現(xiàn)在要修復(fù)我們的問題了,我們是要采用命令行路線。打開終端并查看軟件源中包含了哪些源:


復(fù)制代碼
代碼如下:
cat /etc/apt/sources.list

我的輸出是下面這樣:

   

復(fù)制代碼
代碼如下:
deb cdrom:[elementary OS 0.3 _Freya_ – Daily amd64 (20150208)]/ trusty main restricted
deb http://archive.ubuntu.com/ubuntu/ trusty main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu/ trusty main restricted universe multiverse
deb http://security.ubuntu.com/ubuntu/ trusty-security main restricted universe multiverse
deb-src http://security.ubuntu.com/ubuntu/ trusty-security main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ trusty-updates main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu/ trusty-updates main restricted universe multiverse

在上面的第一行中。它包含了cdrom。我們需要用‘#’來注釋掉這行:

   

復(fù)制代碼
代碼如下:
#deb cdrom:[elementary OS 0.3 _Freya_ – Daily amd64 (20150208)]/ trusty main restricted

要用下面的命令來:

   

復(fù)制代碼
代碼如下:
sudo gedit /etc/apt/sources.list

在你編輯完軟件源后,再次運(yùn)行apt-get update。“apt-get update cannot be used to add new CD-ROMs”這個(gè)錯(cuò)誤應(yīng)該已經(jīng)修復(fù)了。如果你還遇到其他的問題,看一下這篇收集了大部分Ubuntu常見更新錯(cuò)誤修復(fù)的文章。

相關(guān)文章

最新評(píng)論