现在更新时出现错误,由于损坏,我无法安装大多数软件
/etc/apt/sources.list
Run Code Online (Sandbox Code Playgroud)
文件。有没有我可以下载的副本来替换它?
该文件适用于美国的 Ubuntu 12.04(最终测试版)。
我正在寻找/etc/apt/sources.list从命令行恢复到默认值的最佳方法。
有没有办法引用生成这个文件的包的源代码或类似的东西?我想要一种受信任且与版本无关的方式来恢复此文件。
在将其标记为重复之前,请注意我已经查看了此问题。仅当您有可用的 Ubuntu GUI 时才适用。这个问题特定于命令行。
我还审查了这个问题,其中接受的解决方案是有人粘贴了他们sources.list文件的内容。这不是恢复文件的适当方法,因为无法验证提供文件内容的人的意图,并且该文件可能会随着新版本而更改。
我在 simplelinux.ch 上查看了生成器,但这也不是来自 Ubuntu,所以我不打算使用它。
我有 Ubuntu 12.04 LTS。我需要正确的输出,因为我对其进行了编辑,因为它不起作用,但这只会使情况变得更糟。
After downloading the Ubuntu app from the Windows store, I tried to run
gcc --version and it showed command gcc not found same was the case for g++.
I tried to install using sudo apt install gcc and it kept showing me errors like
Err:1 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 binutils-common amd64 2.30-21ubuntu1~18.04.1 404 Not Found
and at the end it gave me this
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
What I already …