Difference between revisions of "Install latest BSDDB"

From Gramps
Jump to: navigation, search
m (Test: references to BSDDB)
m (External Link: one more)
Line 67: Line 67:
*[http://www.jcea.es/programacion/pybsddb.htm Jesus Cea - Official maintainers Site for BSDDB]
*[http://www.jcea.es/programacion/pybsddb.htm Jesus Cea - Official maintainers Site for BSDDB]
*[http://docs.python.org/library/bsddb.html bsddb — Interface to Berkeley DB library — Python v2.6.1 documentation]
*[http://docs.python.org/library/bsddb.html bsddb — Interface to Berkeley DB library — Python v2.6.1 documentation]
*[http://pybsddb.sourceforge.net/ref/intro/data.html Berkeley DB Reference Guide: An introduction to data management]

Revision as of 18:49, 8 January 2009

Some people have encountered bugs in GRAMPS which are due to the database not working good. Installing the latest version of the BSDDB database tends to solve the problem.

Why install latest version ?

Some errors have happened in the past outside of GRAMPS, with the BSDDB database format GRAMPS uses. See eg:

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 recommond 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, unpack. Read in the downloaded code the file docs/index.html on how to configure and make the code. For Linux:

cd /build_unix
sudo make install

Python BSDDB interface

Next, go to http://pybsddb.sourceforge.net Download bsddb3-4.5.0.tar.gz (version at the time of writing), unpack and go in the created directory. Run python setup.py, this should find your installed bsddb3 returning something like:

Found BerkeleyDB 4.5 installation.
  include files in /usr/local/BerkeleyDB.4.5/include
  library files in /usr/local/BerkeleyDB.4.5/lib
  library name is libdb-4.5
Now run 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.5-devel to build. You can test with python test.py, but that does not work on my AMD64

Remove old BSDDB and replace with new in GRAMPS

  • Go into the GRAMPS directory
  • Open the following files:
  • In these files, look up the line
import bsddb
Change this line into
import bsddb3

The above should be further tested !!!


You should now have GRAMPS use the latest BSDDB version. Test if all works

External Link

Information on BSDDB (Python "bindings" for Oracle Berkeley DB)