1. Install apt-rdepends first
sudo apt install apt-rdepends
2. Download all dependencies
apt download $(apt-rdepends openssh-server | grep -v "^ ")
3. If an error E: Can't select candidate version from package debconf-2.0 as it has no candidate
is reported
apt download $(apt-rdepends openssh-server | grep -v "^ " | sed 's/debconf-2.0/debconf/g')
This command will successfully download openssh-server and all required packages and save them in /var/cache/apt/archives directory.
4. Installtion
sudo dpkg -i openssh-server*.deb
even sudo dpkg -i *
-------------本文结束感谢您的阅读-------------
本文作者:
Corner
本文链接: http://corner430.github.io/2023/04/03/Download-the-software-and-all-its-dependencies-on-Ubuntu/
版权声明: 本作品采用 知识共享署名-非商业性使用-相同方式共享 4.0 国际许可协议 进行许可。转载请注明出处!
本文链接: http://corner430.github.io/2023/04/03/Download-the-software-and-all-its-dependencies-on-Ubuntu/
版权声明: 本作品采用 知识共享署名-非商业性使用-相同方式共享 4.0 国际许可协议 进行许可。转载请注明出处!
