apt下載離線安裝包
1.查看依賴
apt-cache depend <package name>
2.下載依賴包
apt-get install dependpackname –reinstall -d xxx
#有些包名中有<>符號,用tr將其刪除
sudo apt-get install --reinstall -d `apt-cache depends packname | grep depends | cut -d: f2 |tr -d "<>"`
# 遞歸下載所有 deb 依賴 (目前極少用到 32 位架構 過濾掉 i386 )
apt-get download $(apt-cache depends --recurse --no-recommends --no-suggests --no-conflicts --no-breaks --no-replaces --no-enhances --no-pre-depends python-setuptools | grep -v i386 | grep "^\w")
3.離線安裝
dpkg -i <package name>
或者
apt install -f ./${deb}
- 常用命令
安裝命令:
dpkg -i xxx.deb --->i(install)
卸載命令:
dpkg -r xxx
查看安裝的軟件
dpkg -l
相關鏈接
https://www.cnblogs.com/faster/p/13887759.html