软件包‘build-essential’没有安装候选项

软件包‘build-essential’没有安装候选项

我一直在尝试在运行 Ubuntu 22.04.2 LTS(GNU/Linux 5.15.0-1032-oracle aarch64)的云虚拟机上安装基本构建

不幸的是,我对 ubuntu 一无所知,但从我所收集的信息来看,我无法获取 build-essential,因为我的 apt-get 存储库可能全部都搞乱了,而且我不确定如何修复它们。

这有点像“问我五岁”的问题。我没有 GUI,所以都是控制台。


这是 /etc/apt/source.list

  ## Note, this file is written by cloud-init on first boot of an instance
## modifications made here will not survive a re-bundle.
## if you wish to make changes you can:
## a.) add 'apt_preserve_sources_list: true' to /etc/cloud/cloud.cfg
##     or do the same in user-data
## b.) add sources in /etc/apt/sources.list.d
## c.) make changes to template file /etc/cloud/templates/sources.list.tmpl

# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.
deb http://eu-frankfurt-1-ad-1.clouds.ports.ubuntu.com/ubuntu-ports/ jammy main restricted
# deb-src http://eu-frankfurt-1-ad-1.clouds.ports.ubuntu.com/ubuntu-ports/ jammy main restricted

## Major bug fix updates produced after the final release of the
## distribution.
deb http://eu-frankfurt-1-ad-1.clouds.ports.ubuntu.com/ubuntu-ports/ jammy-updates main restricted
# deb-src http://eu-frankfurt-1-ad-1.clouds.ports.ubuntu.com/ubuntu-ports/ jammy-updates main restricted

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team. Also, please note that software in universe WILL NOT receive any
## review or updates from the Ubuntu security team.
deb http://eu-frankfurt-1-ad-1.clouds.ports.ubuntu.com/ubuntu-ports/ jammy universe
# deb-src http://eu-frankfurt-1-ad-1.clouds.ports.ubuntu.com/ubuntu-ports/ jammy universe
deb http://eu-frankfurt-1-ad-1.clouds.ports.ubuntu.com/ubuntu-ports/ jammy-updates universe
# deb-src http://eu-frankfurt-1-ad-1.clouds.ports.ubuntu.com/ubuntu-ports/ jammy-updates universe

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team, and may not be under a free licence. Please satisfy yourself as to
## your rights to use the software. Also, please note that software in
## multiverse WILL NOT receive any review or updates from the Ubuntu
## security team.
deb http://eu-frankfurt-1-ad-1.clouds.ports.ubuntu.com/ubuntu-ports/ jammy multiverse
# deb-src http://eu-frankfurt-1-ad-1.clouds.ports.ubuntu.com/ubuntu-ports/ jammy multiverse
deb http://eu-frankfurt-1-ad-1.clouds.ports.ubuntu.com/ubuntu-ports/ jammy-updates multiverse
# deb-src http://eu-frankfurt-1-ad-1.clouds.ports.ubuntu.com/ubuntu-ports/ jammy-updates multiverse

## N.B. software from this repository may not have been tested as
## extensively as that contained in the main release, although it includes
## newer versions of some applications which may provide useful features.
## Also, please note that software in backports WILL NOT receive any review
## or updates from the Ubuntu security team.
deb http://eu-frankfurt-1-ad-1.clouds.ports.ubuntu.com/ubuntu-ports/ jammy-backports main restricted universe multiverse
# deb-src http://eu-frankfurt-1-ad-1.clouds.ports.ubuntu.com/ubuntu-ports/ jammy-            backports main restricted universe multiverse

deb http://ports.ubuntu.com/ubuntu-ports jammy-security main restricted
# deb-src http://ports.ubuntu.com/ubuntu-ports jammy-security main restricted
deb http://ports.ubuntu.com/ubuntu-ports jammy-security universe
# deb-src http://ports.ubuntu.com/ubuntu-ports jammy-security universe
deb http://ports.ubuntu.com/ubuntu-ports jammy-security multiverse
# deb-src http://ports.ubuntu.com/ubuntu-ports jammy-security multiverse

这是我运行 apt-get update 后得到的结果(消息太大,无法容纳)

https://pastebin.com/X39r56GL

答案1

以下是一个模板云源

去下载:

 wget https://raw.githubusercontent.com/canonical/cloud-init/master/templates/sources.list.ubuntu.tmpl .

进行更改,保存原始 sources.list 文件然后替换它,

例如:{{codename}}用 替换它jammy

相关内容