Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save karenetheridge/eed7fdd9d2d5ef92f35c5fc0510fcb51 to your computer and use it in GitHub Desktop.
Save karenetheridge/eed7fdd9d2d5ef92f35c5fc0510fcb51 to your computer and use it in GitHub Desktop.
DB_File rescuing (assumes you are installing using carton, under local/)
Installing some database-related modules (such as DBD::Pg) under macos 10.13.x
(High Sierra) will be problematic because Apple is shipping a bad berkeley-db
with this OS. If you see installation issues mentioning DB_File, you've hit
this problem.
To fix, do these commands in a new shell, in the directory where you are
trying to do the module installation (so as to not pollute your existing
environment):
sudo port install db48 # you may have this already, e.g. via python27
eval $(perl -Mlocal::lib='local/lib/perl5')
cpanm --look DB_File
You're now in another subshell. Edit config.in to add these two lines,
replacing the existing INCLUDE and LIB lines:
INCLUDE = /opt/local/include/db48
LIB = /opt/local/lib/db48
Then execute `perl Makefile.PL && make install` and close this shell.
For background, see: https://rt.cpan.org/Public/Bug/Display.html?id=125238 and https://rt.perl.org/Ticket/Display.html?id=133280
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment