我无法 apt-get 安装任何软件包,因为E: Package '<package name>' has no installation candidate
. 与其他类似命名的问题不同,我使用的是 debian,但由于相同的错误,我无法使任何软件包正常工作。apt 仍然能够列出存储库。在尝试修复sources.list后,我已经更新、升级、重新启动并重复了,但没有任何效果。
例如,
$ sudo apt-get install nodejs
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package nodejs is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
E: Package 'nodejs' has no installation candidate
Run Code Online (Sandbox Code Playgroud)
运行$ find /etc/apt/ -path *.list | xargs cat
产生:
#------------------------------------------------------------------------------# …
Run Code Online (Sandbox Code Playgroud)