After ./configure gives me an error: error: Found Berkeley DB other than 4.8, required for portable wallets (--with-incompatible-bdb to ignore or --disable-wallet to disable wallet functionality) I tried to give ./configure --with-bdb-compatible and ./configure --with-bdb-compatible \ but I always get the same error. How can I fix
That means that the BerkeylyDB version is not compatible with Bitcoin core. To install the correct one, run these:
deb http://[mirror]/debian/ oldstable main
sudo apt-get update
sudo apt-get install libdb4.8-dev libdb4.8++-dev
Then compile.