Open rgynn opened 6 years ago
Same issue here, with postgresql@9.3.
Possible duplicate of https://github.com/petere/homebrew-postgresql/issues/41, which has a workaround, if you don't need plpgsql support.
And a more thorough workaround if you do (brew edit postgresql@X.Y
, add depends_on "perl"
and add perl
to deps = ...
).
This simple workaround by @jsgillen1 worked nicely, without need for brew edit
.
This is what finally worked for me. Open the folder /Library/Developer/CommandLineTools/Packages/
and manually install macOS_SDK_headers_for_macOS_10.14.pkg
. Postgres install worked fine after that.
Hitting this now with 11.2_1 -> 11.3 in Ubuntu WSL
checking for perl.h... no configure: error: header file
is required for Perl
Perl is installed, though:
/home/linuxbrew/.linuxbrew/Cellar/perl/5.28.1 (2,654 files, 71.3MB) * Poured from bottle on 2019-01-04 at 10:33:17
There's a perl.h
inside /usr/lib/x86_64-linux-gnu/perl/5.26.1/CORE/perl.h
I tried to export LIBRARY_PATH="/usr/lib/x86_64-linux-gnu/"
but that didn't help.
Still receiving this error in Catalina. Reinstalling CLTools doesn't work because /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg
no longer exists in Catalina so there seems to be no current workaround.
Update: the brew edit
workaround does not work with postgresql @11
or @12
. Fortunately, I was able to get postgresql 11.5 installed successfully from brew by downloading Xcode 11.2 Beta placing it in my /Applications folder, and running (as root) sudo xcode-select --switch /Applications/Xcode-beta.app/
After that, I could brew install postgresql
without any Perl errors.
This was fixed for me on Catalina just by installing XCode via the app store, phew!
Still receiving this error in Catalina. Reinstalling CLTools doesn't work because
/Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg
no longer exists in Catalina so there seems to be no current workaround.Update: the
brew edit
workaround does not work with postgresql@11
or@12
. Fortunately, I was able to get postgresql 11.5 installed successfully from brew by downloading Xcode 11.2 Beta placing it in my /Applications folder, and running (as root)sudo xcode-select --switch /Applications/Xcode-beta.app/
After that, I couldbrew install postgresql
without any Perl errors.
You are right, Catalina does not have the header file, but my system version is 10.15, aka, it doesn't have /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.15.pkg
After installing XCode from App Store, the error was still there, however, running sudo xcode-select --switch /Applications/Xcode.app/
helped.
Thanks a lot, now I can brew install postgresql smoothly!!
OSX Mojave 10.14 (18A391) Homebrew 1.7.7 Homebrew/homebrew-core (git revision 5e88c5; last commit 2018-10-23) Homebrew/homebrew-cask (git revision 5c3b4; last commit 2018-10-23)
Earlier had 10.5 installed, but ran: