国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁(yè) > 系統(tǒng) > Ubuntu > 正文

解決Ubuntu下apt-get update無(wú)法添加新的CD-ROM的問(wèn)題

2020-06-13 11:24:16
字體:
來(lái)源:轉(zhuǎn)載
供稿:網(wǎng)友

這些天我正在體驗(yàn)Elementary OS Freya,在這期間,我遇到了一個(gè)非常常見(jiàn)的更新錯(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無(wú)法添加新的CD-ROM的錯(cuò)誤

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

在Ubuntu中,找到“軟件與更新”:
Ubuntu,CD-ROM

在Ubuntu Software的第一個(gè)標(biāo)簽中,找到cdrom,如果它是勾選的,那么取消勾選。
Ubuntu,CD-ROM

關(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è)方法對(duì)我無(wú)效,因?yàn)閏drom的選項(xiàng)這時(shí)是灰色的,因?yàn)槲沂褂玫膌ive版本。
Ubuntu,CD-ROM

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

 

復(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。我們需要用‘#’來(lái)注釋掉這行:

   

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

 

要用下面的命令來(lái):

   

復(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ù)了。如果你還遇到其他的問(wèn)題,看一下這篇收集了大部分Ubuntu常見(jiàn)更新錯(cuò)誤修復(fù)的文章。

 


發(fā)表評(píng)論 共有條評(píng)論
用戶名: 密碼:
驗(yàn)證碼: 匿名發(fā)表
主站蜘蛛池模板: 汪清县| 广灵县| 天镇县| 临潭县| 溧阳市| 襄垣县| 上思县| 鄂尔多斯市| 万宁市| 华阴市| 大石桥市| 大埔区| 黎川县| 中宁县| 维西| 辽宁省| 方正县| 兴隆县| 剑阁县| 义乌市| 万全县| 天柱县| 公主岭市| 中山市| 深州市| 九龙坡区| 浦江县| 含山县| 威远县| 竹山县| 永登县| 辉南县| 京山县| 郎溪县| 五峰| 美姑县| 临邑县| 和硕县| 牡丹江市| 正宁县| 丽水市|