人妖在线一区,国产日韩欧美一区二区综合在线,国产啪精品视频网站免费,欧美内射深插日本少妇

新聞動態(tài)

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

發(fā)布日期:2022-02-22 13:47 | 文章來源:源碼之家

這些天我正在體驗(yàn)Elementary OS Freya,在這期間,我遇到了一個非常常見的更新錯誤: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。完整的錯誤在運(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.

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

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

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

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

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

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

現(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”這個錯誤應(yīng)該已經(jīng)修復(fù)了。如果你還遇到其他的問題,看一下這篇收集了大部分Ubuntu常見更新錯誤修復(fù)的文章。

國外穩(wěn)定服務(wù)器

版權(quán)聲明:本站文章來源標(biāo)注為YINGSOO的內(nèi)容版權(quán)均為本站所有,歡迎引用、轉(zhuǎn)載,請保持原文完整并注明來源及原文鏈接。禁止復(fù)制或仿造本網(wǎng)站,禁止在非www.sddonglingsh.com所屬的服務(wù)器上建立鏡像,否則將依法追究法律責(zé)任。本站部分內(nèi)容來源于網(wǎng)友推薦、互聯(lián)網(wǎng)收集整理而來,僅供學(xué)習(xí)參考,不代表本站立場,如有內(nèi)容涉嫌侵權(quán),請聯(lián)系alex-e#qq.com處理。

實(shí)時開通

自選配置、實(shí)時開通

免備案

全球線路精選!

全天候客戶服務(wù)

7x24全年不間斷在線

專屬顧問服務(wù)

1對1客戶咨詢顧問

在線
客服

在線客服:7*24小時在線

客服
熱線

400-630-3752
7*24小時客服服務(wù)熱線

關(guān)注
微信

關(guān)注官方微信
頂部