安装 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 我不知道我还能做些什么来纠正错误。谢谢你。
“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)。因此它对你没有用,应该被删除。我会推荐你到另一个页面了解如何删除
如何删除 PPA?