As we can see , libdb-4.7 got linked with the executable. Then I realized , this is an error related to incorrect linking to different version of BerkeleyDB library on system. This may happen to systems , with multiple BerkeleyDB installed.

[ Solution ]

1. First set up LD_LIBRARY_PATH as bellow , before compiling the BerkeleyDB Program.