Sample Header Ad - 728x90

Building mips package on amd64: Exec format error chroot: failed to run command 'mount'

2 votes
1 answer
2998 views
I'm trying to cross-build a Debian/Ubuntu package on a running amd64 system to mips arch. I've tried several methods, from pubilder to sbuild, but I keep failing. About the latter, on a freshly installed Debian 9 I do:
apt-get -y install sbuild
sbuild-createchroot --arch=mips --make-sbuild-tarball=/srv/chroots/wheezy-sbuild.tgz wheezy /srv/chroots/wheezy http://archive.debian.org/debian/ 
But in the end I get:
W: Failure trying to run: chroot /srv/chroots/wheezy dpkg-deb -f /var/cache/apt/archives/dpkg_1.16.18_mips.deb Version
W: See /srv/chroots/wheezy/debootstrap/debootstrap.log for details
W: Failure trying to run: chroot /srv/chroots/wheezy mount -t proc proc /proc
W: See /srv/chroots/wheezy/debootstrap/debootstrap.log for details
E: Error running debootstrap at /usr/sbin/sbuild-createchroot line 268.
and the log contains:
chroot: failed to run command 'dpkg-deb': Exec format error
chroot: failed to run command 'mount': Exec format error
All the methods I tried end up with that *Exec format error* while trying different commands.
Asked by Maxxer (143 rep)
May 15, 2019, 07:58 PM
Last activity: May 17, 2019, 11:51 AM