安装 Lubuntu 16.04 每当我运行时sudo apt-get update
,都会出现以下错误:
W: The repository «cdrom: // Lubuntu 16.04.2 LTS _Xenial Xerus_ - Release i386 (20170216) xenial Release» does not have a Publication file.
N: Data from a repository like this can not be authenticated and therefore its use is potentially dangerous.
N: See the apt-secure (8) man page for details on creating repositories and configuring users.
W: The repository «http://ppa.launchpad.net/chris-lea/node.js/ubuntu xenial Release» does not have a Publication file.
N: Data from a repository like this can not be authenticated and therefore its use is potentially dangerous.
N: See the apt-secure (8) man page for details on creating repositories and configuring users.
E: Failed to get cdrom: // Lubuntu 16.04.2 LTS _Xenial Xerus_ - Release i386 (20170216) / dists / xenial / main / binary-i386 / Packages Use «apt-cdrom» to make APT recognize this CD. You can not use «apt-get update» to add new CDs
E: Failed to obtain http://ppa.launchpad.net/chris-lea/node.js/ubuntu/dists/xenial/main/binary-i386/Packages 404 Not Found
E: Some index files could not be downloaded, have been omitted, or old ones used instead.
I have run apt-cdrom as it says, but nothing happens.
Any idea what I'm doing wrong?
I have tried to install Node.js and it also gave me error:
npm update check failed │
│ Try running with sudo or get access │
│ to the local update config store via │
│ sudo chown -R $ USER: $ (id -gn $ USER) /home/miguel/.config
尝试清理缓存,但命令 sudo npm cache clean -f 不起作用,我不知道我还能做什么来纠正错误。谢谢。
答案1
“W:” 是您可以忽略的警告,它只告诉您 cdrom(或安装媒体)不存在。您可以删除或注释掉它(我建议将其注释掉,因为如果您犯了错误,或者将来出于某种原因需要它,它可以恢复) 使用
sudo vim /etc/apt/sources.list
并在行首添加一个“#”。此行将成为注释,这意味着系统会忽略它。(你也可以使用其他文本编辑器代替vim
vim)
我查看了您列出的 PPA(通过http://ppa.launchpad.net/chris-lea/node.js/ubuntu/dists/) 并可以看到它涵盖了版本 9.10 到 14.10,因此不涵盖 16.04 (Xenial)。因此它对你没有用,应该被删除。我将向您推荐另一个页面,了解如何删除