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:
tar xzf db-6.2.32.tar.gz
sudo make install
The installation step requires that you are running as an administrator
sudo command will require that you provide the password.
This should print some version information, e.g. ‘Berkeley DB 6.2.32: (April 5, 2017)’.