Previous: , Up: Berkeley DB Notes   [Contents]

10.2 Berkeley DB on Mac OS X

The prebuilt installation of SICStus for Mac OS X assumes that Berkeley DB is installed in the default location /usr/local/BerkeleyDB.VERSION/ (where “VERSION” can be, e.g. “6.2”.

There is no binary installer available for installing Berkeley DB on Mac OS X. Instead you need to build it yourself. To do this you need to download and install the Apple C compiler (Xcode) and then download, build and install the Berkeley DB library, using something like the following in the Terminal program:

  1. Some tools do not understand the way macOS specifies the language. Therefore, set a sensible default language during the build.

    export LC_ALL=en_US.UTF-8

  2. Unpack the downloaded source code archive. At the time of writing, 6.2.32 is the latest version of Berkeley DB 6.2.

    tar xzf db-6.2.32.tar.gz

  3. Move into the source code folder tree

    cd db-6.2.32/build_unix/

  4. Configure Berkeley DB for (64-bit only)


  5. Build


  6. Install in the standard location

    sudo make install

    The installation step requires that you are running as an administrator and the sudo command will require that you provide the password.

  7. Verify that Berkeley DB was installed

    /usr/local/BerkeleyDB.6.2/bin/db_archive -V

    This should print some version information, e.g. ‘Berkeley DB 6.2.32: (April 5, 2017)’.

Send feedback on this subject.