I've been trying to install meteor and as part of the install process it downloads node from a tar file which it pipes to tar. But the tar extract command is erroring out with a missing symbol?

I used homebrew to brew install gnu-tar --with-default-names

curl "${NODE_URL}" | tar zx --strip-components 1 

Will return this:

lazy symbol binding failed: Symbol not found:
Referenced from: /usr/local/bin/tar    
Expected in: /usr/lib/libSystem.B.dylib

dyld: Symbol not found: 
Referenced from: /usr/local/bin/tar   
Expected in: /usr/lib/libSystem.B.dylib

In your example you are using bsd/macos curl with gnu tar, that won't work. Unfortunately many dev programs rely on the apple bash and trying to upgrade things to gnu can break bash scripts.

brew won't even let you install curl "natively"

brew install curl
==> Downloading https://homebrew.bintray.com/bottles/curl-7.54.1.sierra.bottle.tar.gz
==> Caveats
This formula is keg-only, which means it was not symlinked into /usr/local,
because macOS already provides this software and installing another version in
parallel can cause all kinds of trouble.

to fix your problem with the bash script you'll want to rename gnu-tar from tar to gtar, the following will do the trick

brew uninstall gnu-tar
brew install gnu-tar

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .