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.

Revisions

  1. karenetheridge created this gist Jul 23, 2018.
    23 changes: 23 additions & 0 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,23 @@
    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