最近我已將 Ubuntu 軟體版本從 14.10 更新到 15.04,但由於一些技術錯誤,升級未能正確完成,當我嘗試進行更新時,它會拋出如下錯誤
Failed to fetch cdrom://Ubuntu 14.10 _Utopic Unicorn_ - Release amd64
(20141022.1)/dists/utopic/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
W: Failed to fetch cdrom://Ubuntu 14.10 _Utopic Unicorn_ - Release
amd64 (20141022.1)/dists/utopic/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
這些是顯示的錯誤,在這個錯誤中我注意到這些錯誤被提到為 Ubuntu 14.10。但我的已經升級到15.04了,我最近檢查過
lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 15.04
Release: 15.04
Codename: vivid
所以請幫我解決這個問題
答案1
編輯你的/etc/apt/sources.list
.你(可能)會發現類似的行
deb cdrom:[Ubuntu 14.10 _Utopic Unicorn_ - Release amd64 (20141022.1)]/ utopic main restricted
在那裡。要么#
在每個這樣的行的開頭添加一個:
# deb cdrom:[Ubuntu 14.10 _Utopic Unicorn_ - Release amd64 (20141022.1)]/ utopic main restricted
或完全刪除這些行。
也要確保utopic
其中不再有其他引用。如果有則全部改為vivid
.
$ sudo apt-get update
然後應該可以工作。