Install latest BSDDB
Some people have encountered bugs in GRAMPS which are due to the database not working well.
Installing the latest version of the BSDDB database tends to solve the problem.
Why install latest version ?
It can be expected that recompiling BSDDB could solve the problem. However, if BSDDB needs to be recompiled, one can as well install the latest version.
Furthermore, the people of pybsddb recommend doing a local compile if the use of BSDDB is critical.
For genealogists needing GRAMPS this could be considered true.
Before you begin: BACKUP
Take a backup of your genealogical data before you do this. Remember, you should backup data of GRAMPS in .gramps format, and keep that somewhere save (GRDB format is NOT a good backup format!).
Obtaining latest BSDDB version
BSDDB core from Sleepycat (Oracle)
Go to http://www.oracle.com/technology/software/products/berkeley-db/db/index.html and download latest libdb code without encryption (eg Berkeley DB 5.1.19.NC.tar.gz ), unpack. You need to create an Oracle ID for this, but it is OSS software. Read in the downloaded code the file docs/index.html on how to configure and make the code. For Linux:
cd build_unix ../dist/configure make sudo make install
Python BSDDB interface
Next, go to pybsddb ().
Download the version compatible with the downloaded bsddb version, eg bsddb3 5.1.1 is tested with 4.2 and 5.1. Unpack and go in the created directory. Run
python setup.py, this should find your installed bsddb3 returning something like:
Found Berkeley DB 5.1 installation. include files in /usr/local/BerkeleyDB.5.1/include library files in /usr/local/BerkeleyDB.5.1/lib library name is libdb-5.1
python setup.py build to make the package, and lastly install it with
sudo python setup.py install
which installs bsddb3.
Note: you need libpython2.x-devel to build this, with x your version of python.
As a test, run
python >>> import bsddb3 >>> bsddb3.__version__ '5.1.1' >>> bsddb3.db.version() (5, 1, 19)
Remove old BSDDB and replace with new in GRAMPS
- Go into the GRAMPS directory
- Open the following files:
/gramps-2.2.8/src/DbLoader.py /gramps-2.2.8/src/Editors/_EditFamily.py /gramps-2.2.8/src/GrampsDb/_GrampsBSDDB.py /gramps-2.2.8/src/GrampsDb/_GrampsDbBase.py /gramps-2.2.8/src/GrampsDb/_GrampsDBCallback.py /gramps-2.2.8/src/GrampsDb/_ReadGedcom.py /gramps-2.2.8/src/GrampsLogger/_ErrorReportAssistant.py /gramps-2.2.8/src/plugins/Leak.py
- In these files, look up the line
- Change this line into
The above requires further testing!!!
You should now have GRAMPS use the latest BSDDB version. Test if all works
Information on BSDDB (Python "bindings" for Oracle Berkeley DB)