I'm working on installing Bitcoin Core for the mac. I've cloned the repo and installed the dependencies via brew. I'm trying to run autogen.sh but it is failing:

$ ./autogen.sh
/usr/local/bin/glibtoolize: line 406: /usr/local/Library/ENV/4.3/sed: No such file or directory
/usr/local/bin/glibtoolize: line 2513: /usr/local/Library/ENV/4.3/sed: No such file or directory
/usr/local/bin/glibtoolize: line 2513: /usr/local/Library/ENV/4.3/sed: No such file or directory
/usr/local/bin/glibtoolize: line 3601: /usr/local/Library/ENV/4.3/sed: No such file or directory
/usr/local/bin/glibtoolize: line 3845: /usr/local/Library/ENV/4.3/sed: No such file or directory
/usr/local/bin/glibtoolize: line 861: /usr/local/Library/ENV/4.3/sed: No such file or directory
: putting auxiliary files in '.'.
: copying file './ltmain.sh'
/usr/local/bin/glibtoolize: line 3771: /usr/local/Library/ENV/4.3/sed: No such file or directory
configure.ac:45: error: required file 'build-aux/ltmain.sh' not found
autoreconf: automake failed with exit status: 1

I'm not sure what is failing. brew doctor is clean. glibtoolize and sed can both be found. There is no .../Library/ENV directory, so I'm not sure why that isn't automatically getting created.

Any help would be greatly appreciated.

Mac 10.12.6
Bitcoin (7b57bc9) - v0.15.1
  • one observations: normally, capital variables indicate environment/shell vars, so it looks like if a "$" sign is missing, so it is incorrectly interpreted. Also: looking in the forum for "OSX compile" reveals many hits. And lastly: you have installed the command line tools from Xcode, and surely a call to "sed" is ok? (which sed) Dec 17, 2017 at 8:41
  • I do have sed (/usr/bin/sed) and I do have command line tools installed. Any idea where a $ might be missing? I'll look around at the OSX compile issues. Thanks.
    – RyanJM
    Dec 17, 2017 at 14:14
  • hmm, just gave it a try, and it works on a clean machine. I followed this instruction:github.com/bitcoin/bitcoin/blob/master/doc/build-osx.md. A "uname -a" returns: Darwin lulu.local 16.7.0 Darwin Kernel Version 16.7.0: Mon Nov 13 21:56:25 PST 2017; root:xnu-3789.72.11~1/RELEASE_X86_64 x86_64 - I have used a non privileged user, and in his home directory did the brew install. Then downloaded bitcoin core (git clone github.com/bitcoin/bitcoin), and then cd to bitcoin and calling ./autogen.sh - no errors ... can you setup a new user, and try the steps in his home dir? Dec 17, 2017 at 23:27

2 Answers 2


This happens because /usr/local/bin/glibtoolize: is pointing to the wrong directory

line 49 : ${SED="/usr/local/Library/ENV/4.3/sed"}

This was changed when homebrew decided to move their paths. See this stackoverflow post

What worked for me was

brew reinstall libtool


Easier appraoch:

brew install bitcoin

However, as Jonas points out, you should be careful with trusting 3rd party package managers. Specifically, you should verify the SHA1 of the package you're getting from Homebrew matches that of the official release of Bitcoin from either GitHub or the Bitcoin Core website.

More reading:

Is Homebrew safe?

Example of using GPG to verify a package's signature (in this case the SHA256SUMS.asc signature file in https://bitcoincore.org/bin/bitcoin-core-0.15.1/):


  • Using a package manager to install a security critical application is not recommended IMO. What if they deliver a different package, how can the binary be verified by the user? Feb 10, 2018 at 21:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.