ubuntu下载安装包
- 如果只想下载单个包
apt-get download iptables-persistent - 下载包及依赖
- 方法1
首先安装sudo apt install apt-rdepends
apt-get download $(apt-rdepends your_package | grep -v "^ " | sed 's/debconf-2.0/debconf/g')
- 方法2
查看依赖
sudo apt-cache depends python
创建包目录
mkdir your_package&& cd your_package
下载依赖$ for i in $(apt-cache depends python | grep -E 'Depends|Recommends|Suggests' | cut -d ':' -f 2,3 | sed -e s/'<'/''/ -e s/'>'/''/); do sudo apt-get download $i 2>>errors.txt; done
- 方法1