In this tutorial, I will walk you through the process of compiling and installing the well-known Electrum Bitcoin wallet on Debian 12.
The instructions provided on the official Electrum website for installation on Debian 12 are not current and do not function due to alterations in the method of installing Python3 dependencies.
- This guide was tested on Debian 12 and on Linux Mint 22.
- The install requires root privileges
For verifying the Electrum package, you need to download public keys of Electrum developers.
curl -s --tlsv1.3 https://raw.githubusercontent.com/spesmilo/electrum/master/pubkeys/ThomasV.asc | gpg --import
curl -s --tlsv1.3 https://raw.githubusercontent.com/spesmilo/electrum/master/pubkeys/sombernight_releasekey.asc | gpg --import
curl -s --tlsv1.3 https://raw.githubusercontent.com/spesmilo/electrum/master/pubkeys/Emzy.asc | gpg --import
❗Make sure to verify the fingerprint of the imported public keys, more info on Electrum download page
sudo apt-get install python3-pyqt5 libsecp256k1-dev python3-cryptography
sudo apt-get install python3-setuptools python3-pip
- Change current directory
# change directory to /tmp or ~/Downloads
cd /tmp
- Download Electrum using cURL, adjust the version
export VERSION=4.5.5
curl --tlsv1.3 -O https://download.electrum.org/$VERSION/Electrum-$VERSION.tar.gz
curl --tlsv1.3 -O https://download.electrum.org/$VERSION/Electrum-$VERSION.tar.gz.asc
- Verify the signatures of the release and check for
Good Signature
.
LC_ALL=C gpg --verify Electrum-$VERSION.tar.gz.asc
- Install Python virtual environment
sudo apt install python3.12-venv
- Create Python venv in
/opt/electrum
sudo python3 -m venv --system-site-packages /opt/electrum
- Install Electrum
sudo /opt/electrum/bin/pip install Electrum-$VERSION.tar.gz
- Create symlink
ln -s /opt/electrum/bin/electrum /usr/bin/electrum
- Create a .desktop file for adding Electrum to application menu
sudo tee /usr/share/applications/electrum.desktop <<EOF
[Desktop Entry]
Comment=Lightweight Bitcoin Client
Exec=/opt/electrum/bin/electrum %u
GenericName[en_US]=Bitcoin Wallet
GenericName=Bitcoin Wallet
Icon=electrum
Name[en_US]=Electrum Bitcoin Wallet
Name=Electrum Bitcoin Wallet
Categories=Finance;Network;
StartupNotify=true
StartupWMClass=electrum
Terminal=false
Type=Application
MimeType=x-scheme-handler/bitcoin;x-scheme-handler/lightning;
Actions=Testnet;
[Desktop Action Testnet]
Exec=electrum --testnet %u
Name=Testnet mode
EOF
Now you can launch Electrum from the application menu or from terminal using electrum
command.
Enjoy you Electrum Wallet installed from source!