ARTICLE DETAIL

建站实战干货

来自一线的建站与推广经验沉淀,每一条都经过真实交付验证。

ubuntu22.04系统下载程序和依赖,并拷贝到指定路径下

2026/10/7 8:17:18 拓冰建站 浏览量
ubuntu22.04系统下载程序和依赖,并拷贝到指定路径下

脚本1

apt install aptitude
apt-get -d install xxx #xxx是待下载的安装包
mv  /var/cache/apt/archives/* /home/tuners/1

apt install aptitude
apt-get -d install xxx 
mv /var/cache/apt/archives/*.deb /home/tuners/1

xxx 为程序包名称

/home/tuners/1为保存程序包的路径

 脚本2

sudo apt install apt-rdepends -y
apt download $(apt-rdepends gcc | grep -v "^ ")
mv /var/cache/apt/archives/* /home/tuners/1

sudo apt install apt-rdepends -y

apt download $(apt-rdepends gcc | grep -v "^ ")

mv /var/cache/apt/archives/*.deb /home/tuners/1

gcc是程序名称

/home/tuners/1是下载的包的程序路径

下载到的文件