> # Avoid issues when wine is installed.

> sudo su -c 'echo 0 > /proc/sys/fs/binfmt_misc/status'

Please don’t recommend this. If binfmt_misc is enabled, it’s probably for a reason, and disabling it will break things. I have a .NET/Mono app installed that it would break, for example—it’s definitely not just Wine.

If binfmt_misc is causing problems, the proper solution is to register the executable type. https://github.com/mozilla-ai/llamafile#linux describes steps.

I made myself a package containing /usr/bin/ape and the following /usr/lib/binfmt.d/ape.conf:

  :APE:M::MZqFpD::/usr/bin/ape:
  :APE-jart:M::jartsr::/usr/bin/ape: