user95678: The Unix build notes do not show how to install version 4.8 apart from saying 

BerkeleyDB is required for the wallet. Ubuntu and Debian have their 
      own libdb-dev and libdb++-dev packages, but these will install 
      BerkeleyDB 5.1 or later. This will break binary wallet compatibility 
      with the distributed executables, which are based on BerkeleyDB 4.8.If you do not care about wallet compatibility, pass --with-incompatible-bdb to configure. Otherwise, you can build from self-compiled depends (see above).

The referenced README.md from the quoted 

Now, you can either build from self-compiled depends or install the
  required dependencies:

does not discuss BerkeleyDB 4.8.
I know there is ./contrib/install_db4.sh in the source for installing BerkeleyDB 4.8 but it abords on my Ubuntu with curl: (7) Failed to connect to git.savannah.gnu.org port 443: No route to host.

user95678: I found a solution here with:
sudo add-apt-repository ppa:bitcoin/bitcoin
sudo apt-get update
sudo apt-get install libdb4.8-dev libdb4.8++-dev


Also, this says:

The newer libdb should work on most coin daemons, the issue you might find is that the database files (wallet.dat in particular) isn't compatible with all other systems if they're built on an older libdb.

That corresponds to the following line from the bitcoin core github:

This will break binary wallet compatibility with the distributed executables, which are based on BerkeleyDB 4.8.

So, having a newer BerkeleyDB is only a problem, if you want to use your wallet.dat on another system and this other system happens to use BerkeleyDB 4.8 - which is the case for the bitcoind executables which are downloadable from the project itself. 
But if you only use the wallet on your own system or, if you migrate it, you use a system with the newer BerkeleyDB also, then there should be no problems. 

user96053: You can compile it using this script in the Bitcoin Core repository:
https://github.com/bitcoin/bitcoin/blob/master/contrib/install_db4.sh . It will give you instructions about how to then ./configure with this compiled version in order to build the project.
Instructions about building Bitcoin Core are available in the /doc folder, for Unix systems it is at
https://github.com/bitcoin/bitcoin/blob/master/doc/build-unix.md

95678: <p>The <a href="https://github.com/bitcoin/bitcoin/blob/master/doc/build-unix.md" rel="nofollow noreferrer">Unix build notes</a> do not show how to install version 4.8 apart from saying </p>

<blockquote>
  <p>BerkeleyDB is required for the wallet. Ubuntu and Debian have their 
      own libdb-dev and libdb++-dev packages, but these will install 
      BerkeleyDB 5.1 or later. This will break binary wallet compatibility 
      with the distributed executables, which are based on BerkeleyDB 4.8.If you do not care about wallet compatibility, pass --with-incompatible-bdb to configure. Otherwise, you can build from self-compiled depends (see above).</p>
</blockquote>

<p>The referenced <a href="https://github.com/bitcoin/bitcoin/blob/master/depends/README.md" rel="nofollow noreferrer">README.md</a> from the quoted </p>

<blockquote>
  <p>Now, you can either build from self-compiled depends or install the
  required dependencies:</p>
</blockquote>

<p>does not discuss BerkeleyDB 4.8.</p>

<p>I know there is <code>./contrib/install_db4.sh</code> in the source for installing BerkeleyDB 4.8 but it abords on my Ubuntu with <code>curl: (7) Failed to connect to git.savannah.gnu.org port 443: No route to host</code>.</p>
 95678: <p>I found a solution <a href="https://88plug.com/linux/install-berkeley-4-8-db-libs-on-ubuntu-16-04/" rel="nofollow noreferrer">here</a> with:</p>

<pre><code>sudo add-apt-repository ppa:bitcoin/bitcoin
sudo apt-get update
sudo apt-get install libdb4.8-dev libdb4.8++-dev
</code></pre>

<hr>

<p>Also, <a href="https://www.raspberrypi.org/forums/viewtopic.php?t=216846" rel="nofollow noreferrer">this</a> says:</p>

<blockquote>
  <p>The newer libdb should work on most coin daemons, the issue you might find is that the database files (wallet.dat in particular) isn't compatible with all other systems if they're built on an older libdb.</p>
</blockquote>

<p>That corresponds to the following line from the bitcoin core github:</p>

<blockquote>
  <p>This will break binary wallet compatibility with the distributed executables, which are based on BerkeleyDB 4.8.</p>
</blockquote>

<p>So, having a newer BerkeleyDB is only a problem, if you want to use your <code>wallet.dat</code> on another system and this other system happens to use BerkeleyDB 4.8 - which is the case for the <code>bitcoind</code> executables which are downloadable from the project itself. </p>

<p>But if you only use the wallet on your own system or, if you migrate it, you use a system with the newer BerkeleyDB also, then there should be no problems. </p>
 96053: <p>You can compile it using this script in the Bitcoin Core repository:
<a href="https://github.com/bitcoin/bitcoin/blob/master/contrib/install_db4.sh" rel="nofollow noreferrer">https://github.com/bitcoin/bitcoin/blob/master/contrib/install_db4.sh</a> . It will give you instructions about how to then <code>./configure</code> with this compiled version in order to build the project.</p>
<p>Instructions about building Bitcoin Core are available in the <a href="https://github.com/bitcoin/bitcoin/tree/master/doc" rel="nofollow noreferrer"><code>/doc</code></a> folder, for Unix systems it is at
<a href="https://github.com/bitcoin/bitcoin/blob/master/doc/build-unix.md" rel="nofollow noreferrer">https://github.com/bitcoin/bitcoin/blob/master/doc/build-unix.md</a></p>
