The package 'libpcap0.8' was not found during arm64 cross compile

Hi All,

I am trying to build libpcap based application with snapcraft. Able to build for x86 without any issues.
But when I am trying to cross compile for arm64, I am getting below error during snapcraft build.

Failed to fetch stage packages: Error downloading packages for part ‘example-test’: The package ‘libpcap0.8’ was not found…

As an alternative, I manually downloaded libpcap0.8 deb for arm64 and added script in yaml to extract the deb file content to /usr/lib of SNAPCRAFT install directory. This method works.

Why adding “libpcap0.8” under stage-packages in yaml file did not work during snap creation for arm64? Did I miss any configuration?

you would need to add the arm64 architecture to your apt and dpkg setup, then you should be able to use libpcap0.8:arm64 in your stage-packages …

Thanks for your suggestion. Solved.