Installing ARMHF packages


#1

I am trying to cross compile my snap package and I am having trouble installing some apt packages.

The problem is that the OS is resolving both the native (amd64) and armhf packages which leads to conflicts and a failed build.

/snap/bin/snapcraft --target-arch=armhf
Setting target machine to 'armhf'
Installing build dependencies: binutils binutils-arm-linux-gnueabihf cpp-5-arm-linux-gnueabihf cpp-arm-linux-gnueabihf curl gcc-5-arm-linux-gnueabihf gcc-5-arm-linux-gnueabihf-base gcc-5-base:armhf gcc-5-cross-base gcc-6-base:armhf gcc-arm-linux-gnueabihf libasan2-armhf-cross libatomic1-armhf-cross libc-dev-bin libc6 libc6-armhf-cross libc6-dev libc6-dev-armhf-cross libc6-dev:armhf libc6:armhf libcurl3-gnutls libexif-dev libexif-dev:armhf libexif12:armhf libexpat1:armhf libfontconfig1:armhf libfreetype6:armhf libgcc-5-dev-armhf-cross libgcc1-armhf-cross libgcc1:armhf libgd3 libgd3:armhf libgomp1-armhf-cross libgphoto2-6:armhf libgphoto2-dev:armhf libgphoto2-port12:armhf libicu55:armhf libjbig0:armhf libjpeg-turbo8:armhf libjpeg8:armhf libltdl7:armhf liblzma5:armhf libpng12-0:armhf libssl-dev libssl-dev:armhf libssl1.0.0 libssl1.0.0:armhf libstdc++6-armhf-cross libstdc++6:armhf libtiff5 libtiff5:armhf libubsan0-armhf-cross libudev1 libudev1:armhf libusb-1.0-0:armhf libv4l-0:armhf libv4l2rds0:armhf libv4lconvert0:armhf libvpx3:armhf libx11-6:armhf libxau6:armhf libxcb1:armhf libxdmcp6:armhf libxml2:armhf libxpm4:armhf linux-libc-dev linux-libc-dev-armhf-cross linux-libc-dev:armhf v4l-utils:armhf zlib1g-dev:armhf zlib1g:armhf
Reading package lists...
Building dependency tree...
Reading state information...
libexif-dev is already the newest version (0.6.21-2).
libexif-dev set to manually installed.
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
 libexif-dev : Conflicts: libexif-dev:armhf but 0.6.21-2 is to be installed
 libexif-dev:armhf : Conflicts: libexif-dev but 0.6.21-2 is to be installed
E: Unable to correct problems, you have held broken packages.