Ubuntu上好用的阿里云的源内容

在 Ubuntu 20.04 系统中,使用 sudo apt-get 安装 linux-tools-5.15.0-79-generic 软件包时,出现无法定位软件包的问题。尝试多个源替换后仍未解决,最终替换裸机上的 source.list 内容成功下载,文中记录了该源的具体内容。

sudo apt-get install linux-tools-5.15.0-79-generic
正在读取软件包列表... 完成
正在分析软件包的依赖关系树       
正在读取状态信息... 完成       
E: 无法定位软件包 linux-tools-5.15.0-79-generic
E: 无法按照 glob ‘linux-tools-5.15.0-79-generic’ 找到任何软件包
E: 无法按照正则表达式 linux-tools-5.15.0-79-generic 找到任何软件包

发现perf安装不了,找不到软件内容,网上找了好几个源的内容替换后仍然找不到,最后替换了裸机上的source.list内容能下载了,这里记录下源的内容,ubuntu版本是20.04:

# deb cdrom:[Ubuntu 20.04.4 LTS _Focal Fossa_ - Release amd64 (20220223)]/ focal main restricted

# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.
deb http://mirrors.aliyun.com/ubuntu/ focal main restricted
# deb-src http://cn.archive.ubuntu.com/ubuntu/ focal main restricted

## Major bug fix updates produced after the final release of the
## distribution.
deb http://mirrors.aliyun.com/ubuntu/ focal-updates main restricted
# deb-src http://cn.archive.ubuntu.com/ubuntu/ focal-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://mirrors.aliyun.com/ubuntu/ focal universe
# deb-src http://cn.archive.ubuntu.com/ubuntu/ focal universe
deb http://mirrors.aliyun.com/ubuntu/ focal-updates universe
# deb-src http://cn.archive.ubuntu.com/ubuntu/ focal-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://mirrors.aliyun.com/ubuntu/ focal multiverse
# deb-src http://cn.archive.ubuntu.com/ubuntu/ focal multiverse
deb http://mirrors.aliyun.com/ubuntu/ focal-updates multiverse
# deb-src http://cn.archive.ubuntu.com/ubuntu/ focal-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://mirrors.aliyun.com/ubuntu/ focal-backports main restricted universe multiverse
# deb-src http://cn.archive.ubuntu.com/ubuntu/ focal-backports main restricted universe multiverse

## Uncomment the following two lines to add software from Canonical's
## 'partner' repository.
## This software is not part of Ubuntu, but is offered by Canonical and the
## respective vendors as a service to Ubuntu users.
# deb http://archive.canonical.com/ubuntu focal partner
# deb-src http://archive.canonical.com/ubuntu focal partner

deb http://mirrors.aliyun.com/ubuntu/ focal-security main restricted
# deb-src http://security.ubuntu.com/ubuntu focal-security main restricted
deb http://mirrors.aliyun.com/ubuntu/ focal-security universe
# deb-src http://security.ubuntu.com/ubuntu focal-security universe
deb http://mirrors.aliyun.com/ubuntu/ focal-security multiverse
# deb-src http://security.ubuntu.com/ubuntu focal-security multiverse

# This system was installed using small removable media
# (e.g. netinst, live or single CD). The matching "deb cdrom"
# entries were disabled at the end of the installation process.
# For information about how to configure apt package sources,
# see the sources.list(5) manual.

Ubuntu 20.04系统上配置阿里云软件有不同场景,以下是不同软件的配置方法: ### 配置系统阿里镜像地址 将Ubuntu 20.04系统的更改为阿里镜像地址,需先备份原始列表文件,以便在需要时恢复。更新软件包列表后,就能够使用阿里来下载和安装软件包,加快下载速度并提供更好的稳定性 [^1]。 ### 使用阿里云安装Docker 1. 更新软件包,安装必要的apt软件: ```bash sudo apt-get update sudo apt-get install ca-certificates curl gnupg lsb-release ``` 2. 使用阿里云: - 添加阿里云官方GPG密钥: ```bash curl -fsSL http://mirrors.aliyun.com/docker-ce/linux/ubuntu/gpg | sudo apt-key add - ``` - 写入阿里云Docker仓库地址: ```bash sudo sh -c 'echo "deb [arch=amd64] http://mirrors.aliyun.com/docker-ce/linux/ubuntu $(lsb_release -cs) stable" > /etc/apt/sources.list.d/docker.list' ``` 3. 更新并安装Docker: ```bash sudo apt-get update sudo apt-get install docker-ce docker-ce-cli containerd.io ``` 4. 验证是否成功安装了Docker: ```bash sudo systemctl status docker docker --version ``` [^2] ### 配置阿里的Kubernetes 1. 配置阿里的Kubernetes地址,指明此的软件签名用的密钥: ```plaintext # kubernetes aliyun source deb [signed-by=/etc/apt/keyrings/kubernetes-aliyun-keyring.gpg] https://mirrors.aliyun.com/kubernetes/apt/ kubernetes-xenial main ``` 2. 更新软件列表或者安装软件: - 更新软件: ```bash apt-get update ``` - 安装Kubernetes软件: ```bash apt-get install kubeadm=1.28.2-00 kubectl=1.28.2-00 kubelet=1.28.2-00 ``` 3. 确认kubeadm, kubelet和kubectl的版本: ```bash kubeadm version kubelet --version kubectl version ``` [^3][^4]
评论 1
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值