以在x86机器上下载la64的安装包为例。
添加软件源
添加架构 sudo dpkg --add-architecture loongarch64 修改/etc/apt/source.list deb [arch=loongarch64] http://.... 更新软件源 apt update apt clean
安装apt-cache
sudo apt install apt-cache
下载
下载目标软件包 sudo apt download qt5base-dev:loongarch64 查看所需依赖 sudo apt-cache depends qt5base-dev:loongarch64 下载所需依赖 target_pkg=qtbase5-dev:loongarch64 for i in $(apt-cache depends $target_pkg | grep -E "依赖|建议|推荐" | awk -F": " '{ print $2 }' | sed -e s'/<//' -e s'/>//'); do apt download $i; done
打包
cd /var/cache/apt/archives mkdir qt5base-dev mv *.deb qt5base-dev
脚本自动下载
download.sh arch=loongarch64 download_dir=pkgs_download
pkgs=$(cat $1)
if [ -d $download_dir ];then echo "download dir exist, quit." exit 1 else mkdir $download_dir fi
for pkg in $pkgs do if [ ! -d $pkg ];then mkdir $pkg apt download $pkg:$arch for i in $(apt-cache depends $pkg:$arch | grep -E "依赖|建议|推荐" | awk -F": " '{ print $2 }' | sed -e s'/<//' -e s'/>//') do apt download $i done mv *.deb $pkg mv $pkg $download_dir fi done
p.list qtbase5-dev qt5-make qt5dxcb-plugin qtwebengine5-dev
标签:loongarch64,cache,dev,GF,apt,pkg,download,安装包 From: https://blog.51cto.com/u_437549/5979349