Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug - Does Nanos support Mac OS M1? #2078

Open
stevenanthonyrevo opened this issue Nov 13, 2024 · 5 comments
Open

Bug - Does Nanos support Mac OS M1? #2078

stevenanthonyrevo opened this issue Nov 13, 2024 · 5 comments
Labels

Comments

@stevenanthonyrevo
Copy link

I've attempted to use a nanovm and was unable to run command ops pkg load eyberg/node:20.5.0 cli only returns package not found.

@eyberg
Copy link
Contributor

eyberg commented Nov 13, 2024

of course - you might get that msg if you are using a pkg that is x86 only on a (arm) m1 but for this one you shouldn't being seeing that msg

➜  ~ ops pkg load eyberg/node:20.5.0 -a hi.js
running local instance
booting /Users/eyberg/.ops/images/node ...
test
➜  ~ cat hi.js
console.log("test");

(eg: i see this for 20.0.0 but that's cause it is x86 only)

if you want to run an x86 pkg on arm you'd do this:

ops pkg load eyberg/node:v20.0.0 -a hi.js --arch=amd64

@stevenanthonyrevo
Copy link
Author

Thanks for the help. I've attempted to resolve but got a few error messages after attempting to use node:v20.0.0 on an M1.

.ops/0.1.52/kernel.img no such file or directory and No hypervisor found on $PATH.

Seems like ops requires QEMU, or a Hypervisor. Is there an support for M1 without homebrew?

Any steps on resolving would be great!

@eyberg
Copy link
Contributor

eyberg commented Nov 13, 2024

you can install ops a handful of ways:

through curl: https://ops.city/
you can install the desktop app and that will just grab the latest ops/qemu for you: https://storage.googleapis.com/cli/darwin/ops.pkg

(this is probably the easiest option for mac users)

or as you mentioned you didn't want to use homebrew: https://github.com/nanovms/homebrew-ops

but yes ops will need qemu to run locally, also - the 'eyberg/node:v20.0.0' as i mentioned earlier is x86 and that's why it's wanting to use that x86 kernel -

@stevenanthonyrevo
Copy link
Author

Thanks for the helpful links.
I've installed via the ops.pkg the latest version and still unable to find ahypervisor in $PATH for my case. Haven't tried a full restart of the M1.

Ops version: 0.1.42
Nanos version: 0.1.52

I'll attempt to install via homebrew to resolve when I have the chance. Thanks!

@eyberg
Copy link
Contributor

eyberg commented Nov 15, 2024

the desktop app packages both qemus but I just saw that it was only setting up aarch64 - w/the new update i just made it should have both in /usr/local/bin/qemu-system-aarch64 and /usr/local/bin/qemu-system-x86_64

most people would have this in their. path

env | grep PATH

but if not you can add it via (which is what the install script does):

export PATH=$PATH:/usr/local/bin

you can also just do the brew install qemu https://formulae.brew.sh/formula/qemu and that should add it as well

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants