linux 下载deb和其依赖
安装apt-rdepends
apt install apt-rdepends
下载依赖,比如vim
apt download $(apt-rdepends vim | grep -v "^ ")
如果出现错误比如:
E: Can't select candidate version from package debconf-2.0 as it has no candidate
可以使用一下命令:apt-get download $(apt-rdepends vim | grep -v "^ " | sed 's/debconf-2.0/debconf/g')
拷贝deb文件到新的环境,安装之:
dpkg -i *