相关疑难解决方法(0)

如何恢复默认存储库?

现在更新时出现错误,由于损坏,我无法安装大多数软件

/etc/apt/sources.list
Run Code Online (Sandbox Code Playgroud)

文件。有没有我可以下载的副本来替换它?

该文件适用于美国的 Ubuntu 12.04(最终测试版)。

repository software-sources

176
推荐指数
4
解决办法
56万
查看次数

从命令行恢复sources.list中的默认apt存储库

我正在寻找/etc/apt/sources.list从命令行恢复到默认值的最佳方法。

有没有办法引用生成这个文件的包的源代码或类似的东西?我想要一种受信任且与版本无关的方式来恢复此文件。

排除的解决方案

在将其标记为重复之前,请注意我已经查看了此问题。仅当您有可用的 Ubuntu GUI 时才适用。这个问题特定于命令行。

我还审查了这个问题,其中接受的解决方案是有人粘贴了他们sources.list文件的内容。这不是恢复文件的适当方法,因为无法验证提供文件内容的人的意图,并且该文件可能会随着新版本而更改。

在 simplelinux.ch 上查看了生成器,但这也不是来自 Ubuntu,所以我不打算使用它。

command-line apt repository

21
推荐指数
2
解决办法
6万
查看次数

cat /etc/apt/sources.list 的正确输出是什么?

我有 Ubuntu 12.04 LTS。我需要正确的输出,因为我对其进行了编辑,因为它不起作用,但这只会使情况变得更糟。

apt 12.04 cat

4
推荐指数
1
解决办法
9621
查看次数

Error when trying to install g++ in Ubuntu shell in Windows 10

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 …

package-management apt g++ windows-subsystem-for-linux

4
推荐指数
1
解决办法
2873
查看次数