本文主要是介绍Ubuntun构建本地源详细教程,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
联网主机上下载软件包并打包
首先使用一台已连接互联网的同版本ubuntu主机添加国内镜像源
mv /etc/apt/sources.list /etc/apt/sources.list.bak
vim /etc/apt/sources.list# 写入下面的内容:
deb http://mirrors.aliyun.com/ubuntu/ focal main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ focal-security main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ focal-updates main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ focal-proposed main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ focal-backports main restricted universe multiverse
deb [trusted=yes] https://packagecloud.io/fdio/release/ubuntu focal main
获取package cloud源的认证:
curl -L https://packagecloud.io/fdio/release/gpgkey | sudo apt-key add -
apt update
创建文件夹并下载依赖包:
sudo su - rootmkdir -p /root/
这篇关于Ubuntun构建本地源详细教程的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!