tar is giving a symbol error in a bash install script? 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 

NODE_URL="https://nodejs.org/dist/v8.1.3/node-v8.1.3-darwin-x64.tar.gz" 
curl "${NODE_URL}" | tar zx --strip-components 1 


Will return this:

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

dyld: Symbol not found: 
_utimensat   
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
==&gt; Downloading https://homebrew.bintray.com/bottles/curl-7.54.1.sierra.bottle.tar.gz
==&gt; 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