Closed andyaccelerate closed 3 years ago
Has same issue, was problem with the Node version, so I downgraded from v16 to v14. And it worked.
Just fyi - if you set the
Open using Rosetta
option on Terminal.app or iTerm.app - you'll save yourself a lot of headache until more stuff works w/ aarch64 and the toolchain on the M1 macs. TBF, most if not all of this stuff already works on, e.g. Raspberry Pi or Amazon Graviton2 instances ... but, there's a lot of bad scripts that hard-code detections for macOS and do something differently ... it'll take awhile to get those sorted, I expect.Wow! That's really really helpful! Saved me a lot of time and effort!
THANK YOU THANK YOU THANK YOU THANK YOU THANK YOU THANK YOU
Just fyi - if you set the
Open using Rosetta
option on Terminal.app or iTerm.app - you'll save yourself a lot of headache until more stuff works w/ aarch64 and the toolchain on the M1 macs. TBF, most if not all of this stuff already works on, e.g. Raspberry Pi or Amazon Graviton2 instances ... but, there's a lot of bad scripts that hard-code detections for macOS and do something differently ... it'll take awhile to get those sorted, I expect.
Thank you!
Well, I think just using arch -x86_64 zsh won't solve our problem. Let us understand this in this way... -> If I am using shell script in which nvm will be used to install a specific version of node at the beginning and then execute further lined up commands. if I am using arch -x86_64 zsh, If will stop the execution of all other commands after arch -x86_64 zsh <~ this one until and unless we tap ctrl + c.
It is working fine because we temporarily modified "echo [can be other commands too]" for x86_64
Using the same approach for installing node using nvm
~> install rosetta 2 using terminal otherwise arch -x86_64
$ /usr/sbin/softwareupdate --install-rosetta --agree-to-license
#!/bin/zsh
# Just to get environment path for nvm
source ~/.zshrc
arch -x86_64 zsh -c ". ~/.zshrc && nvm install v12.13.0"
arch -x86_64 zsh -c ". ~/.zshrc && nvm use v12.13.0"
arch -x86_64 zsh -c ". ~/.zshrc && nvm alias default v12.13.0"
Since arch x86_64
That's all!!! Hope this will help a lot to all of those automation developers who do not intended to use GUI for automating Mac M1
@imaddi47 what do you think about a PR to automate those steps in nvm itself?
@imaddi47 what do you think about a PR to automate those steps in nvm itself?
Sure! I would love to.
quit the terminal right click - go to "get info" select "open in rosetta" this should allow nvm to install older versions
quit the terminal right click - go to "get info" select "open in rosetta" this should allow nvm to install older versions
thanks for the help , i have this issue :
ERROR: Did not find a new enough assembler, install one or build with
--openssl-no-asm.
Please refer to BUILDING.md
anyone know how to fix that ? on MBA M1
I get the following error, running on a m1 chip macbook. Any idea how to deal with this one, worth to note that I have gone through all of the above solutions.
> Could not find node-14.16.0-darwin-arm64.tar.gz (org.nodejs:node:14.16.0).
Searched in the following locations:
https://nodejs.org/dist/v14.16.0/node-v14.16.0-darwin-arm64.tar.gz
I get the following error, running on a m1 chip macbook. Any idea how to deal with this one, worth to note that I have gone through all of the above solutions.
> Could not find node-14.16.0-darwin-arm64.tar.gz (org.nodejs:node:14.16.0). Searched in the following locations: https://nodejs.org/dist/v14.16.0/node-v14.16.0-darwin-arm64.tar.gz
Have you updated nvm version to 0.39.1
because it is tested after merging this PR
before install
nvm upgrade
@TimJi that's not a command this tool supports.
(
cd "$NVM_DIR"
git fetch --tags origin
git checkout git describe --abbrev=0 --tags --match "v[0-9]*" $(git rev-list --tags --max-count=1)
) && . "$NVM_DIR/nvm.sh"
( cd "$NVM_DIR" git fetch --tags origin git checkout
git describe --abbrev=0 --tags --match "v[0-9]*" $(git rev-list --tags --max-count=1)
) && 。“$NVM_DIR/nvm.sh”
升级nvm版本
For anyone wondering how to do this....
- Right click the app (Terminal, iTerm, etc.)
- Tap "Get Info"
- Select "Open using Rosetta"
- Restart terminal and you're good to go!
Screenshots
It work well for me
thx ~
tips: need to restart
iTerm
app
In mac M2 chip
Its Terminal
instead of iTerm and can be found in the Application/Utilities
folder
Not just with an M2; on all Macs. iTerm is just a commonly used userland shell.
For anyone wondering how to do this....
- Right click the app (Terminal, iTerm, etc.)
- Tap "Get Info"
- Select "Open using Rosetta"
- Restart terminal and you're good to go!
Screenshots
It work well for me thx ~ tips: need to restart
iTerm
appIn mac M2 chip
Its
Terminal
instead of iTerm and can be found in theApplication/Utilities
folder
Thanks! It works for me,I'm M3
I think it is time to update the docs on Rosetta now. This has been in for a good while: https://github.com/nvm-sh/nvm/pull/2657
@kerberw PRs welcome :-)
I'm trying to install the latest version of node using nvm. I've just got the newly released SIlicon Macbook Pro with the M1 chip (not sure if that is related). I've installed xcode on the app store and the xcode tools on the command line. The main error i'm getting is:
clang: error: no such file or directory: 'CXX=c++'
Full command output is at the bottom of the page.
Any help appreciated, Thanks
Operating system and version:
MacOS Big Sur
nvm debug
output:nvm ls
output:How did you install
nvm
?install script in readme
What steps did you perform?
What happened?