Copied from
https://github.com/TentacleMan/teslacoin-tman/blob/master/doc/readme-qt.rstBerkeley DB version warning
A warning for people using the static binary version of Bitcoin on a Linux/UNIX-ish system (tl;dr: Berkeley DB databases are not forward compatible).
The static binary version of Bitcoin is linked against libdb4.8 (see also this Debian issue).
Now the nasty thing is that databases from 5.X are not compatible with 4.X.
If the globally installed development package of Berkeley DB installed on your system is 5.X, any source you build yourself will be linked against that. The first time you run with a 5.X version the database will be upgraded, and 4.X cannot open the new format. This means that you cannot go back to the old statically linked version without significant hassle!
What this means is that you will have problems opening a 4.X wallet on a 5.X system, but there are tools to convert them. I have myself built TeslaCoin-Qt with Berkeley DB version 5.3:
ldd bin/TeslaCoin-Qt
...
libdb_cxx-5.3.so => /usr/lib/libdb_cxx-5.3.so (0x00007fb175f4a000)
...
That should not cause problems I think, but I recommend building the headless Teslacoind daemon from my repo because there is additional stuff that needs to be done with the Teslacoin-qt.pro file that I have not performed. They are described in the BottleCaps-thread I linked to above.