Closed metaist closed 3 months ago
You can try changing binfmt_misc
: https://github.com/jart/cosmopolitan?tab=readme-ov-file#linux
Thanks for getting back to me.
$ sudo wget -O /usr/bin/ape https://cosmo.zip/pub/cosmos/bin/ape-$(uname -m).elf
$ sudo chmod +x /usr/bin/ape
$ sudo sh -c "echo ':APE:M::MZqFpD::/usr/bin/ape:' >/proc/sys/fs/binfmt_misc/register"
sh: 1: echo: echo: I/O error
$ sudo sh -c "echo ':APE-jart:M::jartsr::/usr/bin/ape:' >/proc/sys/fs/binfmt_misc/register"
sh: 1: echo: echo: I/O error
Ok, so maybe the problem is that root
can't write to /proc/sys/fs/binfmt_misc
. I'll see if I can get that to work.
I tried looking at how other people handled similar issues: https://github.com/multiarch/qemu-user-static/issues/38#issuecomment-543521290
But then after reading the actual binfmt_misc
docs I see that I actually created the APE
and APE-jart
files in /proc/sys/fs/binfmt_misc
(it was just when I tried recreating them that I got the I/O error).
Still doesn't work.
$ ./datasette
invalid file (bad magic number): Exec format error
$ /usr/bin/ape ./datasette
ape error: ./datasette: didn't embed ELF magic
Okay, I'll cut a new release in a bit and we can try again. Are you running this inside a Docker image?
Thanks. I'm running this directly on my machine.
I think you can get it to work by:
wget https://github.com/ahgamut/superconfigure/releases/download/z0.0.51/datasette.zip
unzip datasette.zip
chmod +x bin/datasette
./bin/datasette
Thank you; confirmed that works. I didn't realize that the APE was inside the first level of zip file.
I'm having trouble running
datasette
(or any of the releases) on Linux: