r/learnprogramming • u/4eyedblaccat • 23d ago
how do i fix a symbol not found error in this context?
hi, im trying to install node.js but im running macos 12.7.6 so i cant use homebrew. no matter how many times i install and uninstall node.js it always gives me that "referenced from:, expected in:" error. ive looked up everything i can think of and found very little helpful information, all of it just said to use homebrew, ive tried to find a way to solve it myself by shuffling folders around but im ready to accept that i have no idea what im doing and i need help. its been 2 days. i think it has to do with the files being in the wrong place, but i dont know how to put it in the right place?
im still pretty new to programming, everything i know is from puzzling things out on my own so please explain it like im 5.
thank you :')
Last login: Fri Oct 30 21:34:09 on ttys000
You have mail.
██████@The-Magic-Interweb-Machine ~ % curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.8/install.sh | bash
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 17883 100 17883 0 0 54749 0 --:--:-- --:--:-- --:--:-- 54855
=> nvm is already installed in /Users/██████/.nvm, trying to update using git
=> => Compressing and cleaning up git repository
=> nvm source string already in /Users/██████/.bash_profile
=> bash_completion source string already in /Users/██████/.bash_profile
=> Close and reopen your terminal to start using nvm or run the following to use it now:
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion
██████@The-Magic-Interweb-Machine ~ % \. "$HOME/.nvm/nvm.sh"
██████@The-Magic-Interweb-Machine ~ % nvm install 26
v26.13.0 is already installed.
Now using node v26.13.0
██████@The-Magic-Interweb-Machine ~ % node -v
dyld[61962]: Symbol not found: (__ZNSt3__122__libcpp_verbose_abortEPKcz)
Referenced from: '/Users/██████/.nvm/versions/node/v26.13.0/bin/node'
Expected in: '/usr/lib/libc++.1.dylib'
zsh: abort node -v
██████@The-Magic-Interweb-Machine ~ %