得到“E:存储库'http://deb.debian.org/debian bionic Release'没有发布文件。”在新的 kde neon 上安装 nodejs 时

得到“E:存储库'http://deb.debian.org/debian bionic Release'没有发布文件。”在新的 kde neon 上安装 nodejs 时

我运行这个命令

sudo apt-get install curl software-properties-common
curl -sL https://deb.nodesource.com/setup_14.x | sudo bash -

关于 kde neon 和错误

## Installing the NodeSource Node.js 14.x repo...


## Populating apt-get cache...

+ apt-get update
Hit:1 http://by.archive.ubuntu.com/ubuntu bionic InRelease                             
Hit:2 http://by.archive.ubuntu.com/ubuntu bionic-updates InRelease                     
Hit:3 http://by.archive.ubuntu.com/ubuntu bionic-backports InRelease                   
Hit:4 http://security.ubuntu.com/ubuntu bionic-security InRelease                      
Hit:5 https://dl.yarnpkg.com/debian stable InRelease                                   
Ign:7 http://security.debian.org/debian-security bionic InRelease                      
Ign:8 http://deb.debian.org/debian bionic InRelease                                    
Get:9 http://archive.neon.kde.org/user bionic InRelease [153 kB]                       
Err:10 http://security.debian.org/debian-security bionic Release                       
  404  Not Found [IP: 151.101.112.204 80]
Hit:11 http://dl.google.com/linux/chrome/deb stable InRelease                          
Ign:12 http://deb.debian.org/debian bionic-updates InRelease                           
Err:13 http://deb.debian.org/debian bionic Release                                     
  404  Not Found [IP: 151.101.112.204 80]
Err:14 http://deb.debian.org/debian bionic-updates Release                             
  404  Not Found [IP: 151.101.112.204 80]
Hit:15 https://repo.skype.com/deb stable InRelease                              
Hit:6 https://packagecloud.io/slacktechnologies/slack/debian jessie InRelease          
Reading package lists... Done                                                          
E: The repository 'http://security.debian.org/debian-security bionic Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
E: The repository 'http://deb.debian.org/debian bionic Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
E: The repository 'http://deb.debian.org/debian bionic-updates Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
Error executing command, exiting

答案1

您的/etc/apt/sources.list或目录中的文件/etc/apt/sources.list.d/包含与 Ubuntu 版本名称混合的 Debian 软件包源。这些存储库不存在。确保您只添加适用于您的 Ubuntu 版本的软件包源。

跑步

grep -rl 'debian\.org/debian' /etc/apt/sources.list*

查找包含这些条目的文件。

编辑相应的文件并删除包含http://deb.debian.org/debianhttp://security.debian.org/debian-security (例如sudo nano /etc/apt/sources.list)的所有条目,或者如果它是仅包含此类条目的单个文件,则删除该文件/etc/apt/sources.list.d/

然后运行

curl -sL https://deb.nodesource.com/setup_14.x | sudo bash -

再次紧随其后

sudo apt-get install -y nodejs

安装nodejs

相关内容