赞
踩
dpkg: error package architecture (amd64) does not match system (arm64)
dpkg安装deb的时候报错,
# dpkg -i hello-2212-linux-amd64.deb
dpkg: error processing archive hello-2212-linux-amd64.deb (--install):
package architecture (amd64) does not match system (arm64)
Errors were encountered while processing:
hello-2212-linux-amd64.deb
原因是打包机器的的architecture (amd64) 和 安装的 机器architecture (arm64)不同所致
解决方案是:打包的时候,指定 architecture
cat package/DEBIAN/control
Package: hello
Version: 2212
Section: Software
Priority: optional
Depends:
Architecture: arm64
maintainer:
description:
其中 package 是要打包的目录
重新打包
VERSION=2212
PKG_NAME="hello-$VERSION-linux-arm64.deb"
dpkg -b package/ $PKG_NAME
重新安装
# dpkg -i hello-2212-linux-arm64.deb
(Reading database ... 34268 files and directories currently installed.)
Preparing to unpack hello-2212-linux-arm64.deb ...
Unpacking hccbagent (2212) over (2212) ...
Setting up hccbagent (2212) ...
安装成功
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。