ubuntu通过apt下载离线安装包

1 下载

为内网服务器安装软件,现找一台有网的ubuntu电脑,已安装gcc为例

# 更新依赖源
apt-get update
 
# 把缓存文件夹里的deb包清理掉
apt-get clean
 
# 下载 build-essential 包,因为 build-essential 包中有 gcc、g++、make 等依赖包
apt-get install -d build-essential
 
# 进入缓存文件夹查询已下载的 deb 包
cd /var/cache/apt/archives

2 安装

将deb包所在的文件夹下

dpkg -i   *.deb

参考
https://blog.csdn.net/m0_50105717/article/details/139375406

猜你喜欢

转载自blog.csdn.net/weixin_45379185/article/details/141073470
今日推荐