Reputation: 93
My mid 2014 Macbook Pro can't be updated past High Sierra 10.13.6. I am trying to install ANY version of node.js. Is there any way to get Node.js running on my device? My end goal is to use Angular
I used brew to install node in Terminal:
brew install node
I was given this warning amongst other stuff:
Warning: You are using macOS 10.13.
We (and Apple) do not provide support for this old version.
After installation, I tried the following:
node
I got this in response:
dyld: lazy symbol binding failed: Symbol not found: ____chkstk_darwin
Referenced from: /usr/local/bin/node (which was built for Mac OS X 10.15)
Expected in: /usr/lib/libSystem.B.dylibdyld: Symbol not found: ____chkstk_darwin
Referenced from: /usr/local/bin/node (which was built for Mac OS X 10.15) Expected in: /usr/lib/libSystem.B.dylibAbort trap: 6
Upvotes: 9
Views: 20932
Reputation: 31
I'm not good at English, please read with consideration
You can also install node v22.2.0
brew install llvm@12
/usr/local/Homebrew/Library/Homebrew/shims/super/cc # on line 80
"#{ENV["HOMEBREW_PREFIX"]}/opt/llvm/bin/#{Regexp.last_match(1)}"
rewrite this as below
"#{ENV["HOMEBREW_PREFIX"]}/opt/llvm@12/bin/#{Regexp.last_match(1)}"
llvm@15 is required, there are several ways
How to install llvm@13 with Homerew on macOS High Sierra 10.13.6? Got "Built target lldELF" error
or
brew install --cc=llvm_clang llvm@15
download, Extraction, copying, takes time, before make
/tmp/llvmA15...../llvm-project-15.0.7.src/lldb/source/Host/macosx/objcxx/HostInfoMacOSX.mm # on line 236
if (cputype == CPU_TYPE_ARM64 && cpusubtype == CPU_SUBTYPE_ARM64E) {
rewrite this as below
if (cputype == CPU_TYPE_ARM64) {
After installing llvm@15
/usr/local/Homebrew/Library/Homebrew/shims/super/cc # on line 80
"#{ENV["HOMEBREW_PREFIX"]}/opt/llvm@12/bin/#{Regexp.last_match(1)}"
rewrite this as below
"#{ENV["HOMEBREW_PREFIX"]}/opt/llvm@15/bin/#{Regexp.last_match(1)}"
Set environment variables in .zshrc or .bashrc
export HOMEBREW_NO_INSTALL_FROM_API=1
brew edit node
rewrite line 36 as a comment
# on_macos do
# depends_on "llvm" => [:build, :test] if DevelopmentTools.clang_build_version <= 1100
# end
Disable System Integrity Protection (SIP)
Rewrite header for c-ares installation,which depends on it
sudo vim /usr/include/dispatch/dispatch.h # line 38
#if !defined(HAVE_UNISTD_H) || HAVE_UNISTD_H
rewrite this as below
#if !defined(HAVE_UNISTD_H) // || HAVE_UNISTD_H
Copy and rewrite header for node installation
sudo cp /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/os/signpost.h /usr/include/os/
sudo vim /usr/include/os/signpost.h # on line 280
#define os_signpost_event_emit(log, event_id, name, ...) \\
os_signpost_emit_with_type(log, OS_SIGNPOST_EVENT, \\
event_id, name, ##__VA_ARGS__)
rewrite this as below
#define os_signpost_event_emit(log, event_id, name, ...)
// os_signpost_emit_with_type(log, OS_SIGNPOST_EVENT, \\
event_id, name, ##__VA_ARGS__)
brew install --cc=llvm_clang node
Enable SIP if you don't want to touch the system
Summarized, read the link for more details
https://github.com/orgs/Homebrew/discussions/4751
Upvotes: 2
Reputation: 557
I ran into a similar problem and here's how I fixed it:
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion"
source ~/.bash_profile
nvm --version
. You should get something like 0.39.2 in the outputnvm install 17.9.1
to install Node 17.9.1node -v
and npm -v
. You should get outputs like v17.9.1 and 8.11.0 respectively.Upvotes: 15
Reputation: 57
For mac 10.13.X the solution for me was to alter the nvm install version on my mac to:
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.37.2/install.sh | bash
then install the last version that works on my os.
`nvm install 16.20.2`
then nvm -v
& node -v
. both commands now return values rather than the error the original poster and I experienced. I selected the versions simply by correlating release dates from the nvm github repo and the Nodejs.org so these are untested in terms of compatibility on my mac but this has gotten me to start running frameworks
Upvotes: 1
Reputation: 445
In case you need new verson of nodejs. I believe, it's possible to install linux/windows on older macbooks to use nodejs 18+.
Upvotes: -1
Reputation: 71
I had the same problem...
I believe the last nodejs version suported by high sierra is v17.9.1
https://nodejs.org/download/release/v17.9.1/
Upvotes: 7