Skip to content

MacPorts Berkley-DB 4 problem and work around

August 15th, 2010

I’ve upgraded my MacPro’s hardware a bit the other day and I’ve noticed that something went bye-bye when running eclipse. Namely eclipse itself wasn’t working anymore. So I thought: What a great opportunity to do an update (eclipse, jdk…). And MacPorts. Because I wanted to upgrade my python to 2.7 (2.7 has a couple of extra niceties compared to 2.6, and django doesn’t yet work with 3.x).

Anyway, I’ve downloaded the Helios eclipse, cleaned up macports and updated it again. Nice. Had to re-download Xcode, which, this time is a 2.x GB, due to the inclusion of iOS devel environment. Oh, well…

When doing a port install python27, I’ve noticed an error:

snip--

--->  Verifying checksum(s) for db46
Error: Checksum (md5) mismatch for patch.4.6.21.1
Error: Checksum (md5) mismatch for patch.4.6.21.2
Error: Checksum (md5) mismatch for patch.4.6.21.3
Error: Checksum (md5) mismatch for patch.4.6.21.4
Error: Target org.macports.checksum returned: Unable to verify file checksums
Log for db46 is at: /opt/local/var/macports/logs/.../main.log

snip--

Ouch.

Fortunately, I’ve managed to install most of the other dependencies by hand, so only this one and xorg were left. Went to the tutorial and did the forced clean and everything, to no avail. So went to follow the file trail and to the bug tracker. Surprise! All the patches were in fact HTML pages from Oracle. After a bit more digging, I’ve found another place containing the patch and wrote simple set of scripts:

  1. run sudo port install db46 (which is going to fail)

  2. change dir to where the port command downloaded the stuff (mine is in: /opt/local/var/macports/distfiles/db4/4.6.21_6)

  3. remove the patches

  4. do:

    for i in 1 2 3 4; do
      echo $i && wget
    done
  5. run sudo port install db46 again

This way, you get the db46 to compile nicely and can continue the installation of whatever triggered this issue. And blame Oracle, of course (it seems to be trendy these days…)

PS: The messages with the work around on the bug tracker are mine :)

Share on
Reddit
Linked in
Whatsapp

A little experiment: