Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Install libdb4.8 on Debian (from Ubuntu ppa) for i386 or amd64
#!/usr/bin/env bash
if [ "$#" -ne "1" ]; then
echo "usage :"
echo " $0 <amd64|i386>"
elif ! [ "$1" = "amd64" ] && ! [ "$1" = "i386" ]; then
echo "Bad architecture argument. First and only argument must be amd64 or i386."
else
mkdir "tmplibdb" && cd "tmplibdb"
if [ "$1" = "amd64" ]; then
wget -qq "https://launchpad.net/~bitcoin/+archive/ubuntu/bitcoin/+files/libdb4.8_4.8.30-trusty1_amd64.deb"
wget -qq "https://launchpad.net/~bitcoin/+archive/ubuntu/bitcoin/+files/libdb4.8-dev_4.8.30-trusty1_amd64.deb"
wget -qq "https://launchpad.net/~bitcoin/+archive/ubuntu/bitcoin/+files/libdb4.8++_4.8.30-trusty1_amd64.deb"
wget -qq "https://launchpad.net/~bitcoin/+archive/ubuntu/bitcoin/+files/libdb4.8++-dev_4.8.30-trusty1_amd64.deb"
elif [ "$1" = "i386" ]; then
wget -qq "https://launchpad.net/~bitcoin/+archive/ubuntu/bitcoin/+files/libdb4.8_4.8.30-trusty1_i386.deb"
wget -qq "https://launchpad.net/~bitcoin/+archive/ubuntu/bitcoin/+files/libdb4.8-dev_4.8.30-trusty1_i386.deb"
wget -qq "https://launchpad.net/~bitcoin/+archive/ubuntu/bitcoin/+files/libdb4.8++_4.8.30-trusty1_i386.deb"
wget -qq "https://launchpad.net/~bitcoin/+archive/ubuntu/bitcoin/+files/libdb4.8++-dev_4.8.30-trusty1_i386.deb"
fi
dpkg -i *.deb
cd .. && rm -rf "tmplibdb"
fi
@darosior

This comment has been minimized.

Copy link
Owner Author

@darosior darosior commented Jan 11, 2020

I was tired of setting up libdb4.8 each time I install core on a new machine so it's both a reminder and an useful access point, for example (as root because of dpkg -i):

wget https://gist.githubusercontent.com/darosior/a5d93c6245a32f7a8bed2ac4e33a0011/raw/89c49515febbd55ffb60e4add9d08f299862cde4/install_libdb4.8.sh && chmod +x install_libdb4.8.sh && ./install_libdb4.8.sh amd64 && rm install_libdb4.8.sh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment