KawaiiCrypto Posted August 31, 2017 Report Share Posted August 31, 2017 (edited) I bought a Raspberry Pi 3 a while ago and got it recently. So of course I decided to run my denarius wallet on it, so it can stake always without my computer being on. The operating system is Raspbian Stretch, so I assume this tutorial will work for debian stretch as well. Start by opening a terminal and paste the following code to install dependecies: sudo apt-get update sudo apt-get upgrade -y sudo apt-get install autoconf libtool libssl1.0-dev libboost-all-dev libminiupnpc-dev -y Because compiling can take up a large amount of RAM and the raspberry Pi only has 1 gigabyte of it, let us create a swapfile: cd / fallocate -l 4G swapfile chmod 0600 swapfile mkswap swapfile swapon swapfile Now, because the daemon requires Berkeley database version 4.8 to work, we need to download, compile and install it since that is not included in the software repositories. cd ~/Downloads wget http://download.oracle.com/berkeley-db/db-4.8.30.NC.tar.gz tar -xzvf db-4.8.30.NC.tar.gz cd db-4.8.30.NC/build_unix/ ../dist/configure --enable-cxx make sudo make install Now, let us download the denarius source code and compile it. cd ~/Downloads git clone https://github.com/carsenk/denarius.git cd denarius/src Because we use a custom Berkeley library, we need to specify its location in the makefile, so go ahead and open that up using nano: nano makefile.unix look for this line: DEFS += $(addprefix -I,$(CURDIR) $(CURDIR)/obj $(CURDIR)/json $(BOOST_INCLUDE_PATH) $(BDB_INCLUDE_PATH) $(OPENSSL_INCLUDE_PATH)) Change it to this line: DEFS += $(addprefix -I,$(CURDIR) $(CURDIR)/obj $(CURDIR)/json $(BOOST_INCLUDE_PATH) $(BDB_INCLUDE_PATH) $(OPENSSL_INCLUDE_PATH) /usr/local/BerkeleyDB.4.8/include/) Press CTRL+O to save the file, press enter to verify the filename, then press CTRL+X to exit nano. Now we are ready to compile it! When you have typed in this command, prepare to wait for a while, maybe grab a good book or go to the denarius gitter chat to socialize. Compiling took 63 minutes on my Pi, it will depend on your swapfiles read/write performance and if you have overclocked your Pi. make -f makefile.unix -j4 LDFLAGS="-L/usr/local/BerkeleyDB.4.8/lib" Now since we are using a custom library, we need to tell the operating system to let programs use that. To do that, we need to edit the file /etc/ld.so.preload: nano /etc/ld.so.preload Add the following line to the file, then save and exit, like before: /usr/local/BerkeleyDB.4.8/lib/libdb_cxx-4.8.so and reboot: sudo reboot Now, your denariusd is ready to run and you set it up like you always would. Edited February 25, 2018 by KawaiiCrypto fallocate instead of dd 4 1 Quote Link to comment Share on other sites More sharing options...
Ragtag Posted September 20, 2017 Report Share Posted September 20, 2017 Sweet work @KawaiiCrypto , my weekend project! 1 Quote Link to comment Share on other sites More sharing options...
Ghost Posted September 22, 2017 Report Share Posted September 22, 2017 Awesome tutorial @KawaiiCrypto ...If you want to run the full Denarius QT Wallet on a Raspberry Pi 3, then do the following: Install the deps, you may only need to install libqt4-dev and libqrencode-dev packages if you followed the tutorial above. sudo apt-get install build-essential libtool autotools-dev automake pkg-config libssl-dev libevent-dev libboost-all-dev libminiupnpc-dev libqt5gui5 libqt5core5a libqt5dbus5 qttools5-dev qttools5-dev-tools libqrencode-dev -y Then install the final dependency needed for Denarius QT, this is an alternative method to Kawaii's above that does not require you to compile the Berkeley DB 4.8 sudo apt-get install software-properties-common sudo add-apt-repository ppa:bitcoin/bitcoin sudo apt-get update sudo apt-get install libdb4.8-dev libdb4.8++-dev Create the swapfile on your Pi (same as Kawaii's above) so that you can compile the code, since it has only 1GB of RAM. This creates a 4GB Swapfile. cd / dd if=/dev/zero of=swapfile bs=1M count=4000 chmod 0600 swapfile mkswap swapfile swapon swapfile Then we just need to clone our Denarius repository: cd ~/Downloads git clone https://github.com/carsenk/denarius.git cd denarius Once inside our denarius directory, we need to tell Qt (qmake) to setup our makefile for compiling: qmake "USE_UPNP=1" "USE_QRCODE=1" denarius-qt.pro USE_LEVELDB=1 is required, USE_UPNP and USE_QRCODE are optional. Now we are finally ready to make! make -j4 (4 is the number of cores of your processor that you want to use for compiling, generally on the Pi3s you can use 4 cores) Once it is done building and if you didn't get any errors you will be able to run the following to launch the Denarius QT Wallet! ./Denarius If you run into any issues during the first time trying to make the QT, try going into the /src directory from Kawaii's tutorial above and compiling the denariusd first and then compile the QT. (Also when compiling denariusd in Kawaii's tutorial, you can avoid having to edit any makefiles by installing the Berkeley DB 4.8 from the PPA I listed above). 1 Quote Founder of BlockForums.org - PM me for any help - Join our Discord Server: https://discord.gg/UPpQy3n Link to comment Share on other sites More sharing options...
buzzkillb Posted September 22, 2017 Report Share Posted September 22, 2017 Only following carsen's guide, when I type ./Denarius I get a cannot connect to server X. Quote Link to comment Share on other sites More sharing options...
Ghost Posted September 22, 2017 Report Share Posted September 22, 2017 4 hours ago, buzzkillb said: Only following carsen's guide, when I type ./Denarius I get a cannot connect to server X. Are you building within Ubuntu MATE 16.04? Quote Founder of BlockForums.org - PM me for any help - Join our Discord Server: https://discord.gg/UPpQy3n Link to comment Share on other sites More sharing options...
buzzkillb Posted September 23, 2017 Report Share Posted September 23, 2017 2 hours ago, Carsen said: Are you building within Ubuntu MATE 16.04? Correct, MATE 16.04. Anyone else try this out? 1 Quote Link to comment Share on other sites More sharing options...
Ghost Posted September 23, 2017 Report Share Posted September 23, 2017 7 minutes ago, buzzkillb said: Correct, MATE 16.04. Anyone else try this out? Whats the exact error? Was it able to compile fine and you just can't run ./Denarius? You do need to have your Pi3 connected to a screen of some sort for the QT. Quote Founder of BlockForums.org - PM me for any help - Join our Discord Server: https://discord.gg/UPpQy3n Link to comment Share on other sites More sharing options...
buzzkillb Posted September 23, 2017 Report Share Posted September 23, 2017 This is what it says after running ./Denarius "Denarius: cannot connect to X server" No errors in the compile. Will try kawaii's guide next and see if that changes anyhting. 1 Quote Link to comment Share on other sites More sharing options...
Ghost Posted September 23, 2017 Report Share Posted September 23, 2017 15 hours ago, buzzkillb said: This is what it says after running ./Denarius "Denarius: cannot connect to X server" No errors in the compile. Will try kawaii's guide next and see if that changes anyhting. Sounds like it is potentially a permissions issue with your X server on your OS install. You can try the below to set the permissions to the root user. You need to allow the root user access to the X server: xhost local:root And point the command to the right DISPLAY: sudo DISPLAY=$DISPLAY gedit /etc/profile 1 Quote Founder of BlockForums.org - PM me for any help - Join our Discord Server: https://discord.gg/UPpQy3n Link to comment Share on other sites More sharing options...
Ragtag Posted December 7, 2017 Report Share Posted December 7, 2017 BTW @KawaiiCrypto @Carsen is 2GB of RAM enough - 1GB of physical RAM and 1GB of swapfile? Quote Link to comment Share on other sites More sharing options...
KawaiiCrypto Posted December 7, 2017 Author Report Share Posted December 7, 2017 7 hours ago, Ragtag said: BTW @KawaiiCrypto @Carsen is 2GB of RAM enough - 1GB of physical RAM and 1GB of swapfile? Hmm I would think it is possible to compile with 2GB of RAM. There is only one way to find out - try. Quote Link to comment Share on other sites More sharing options...
petrvsrex Posted January 15, 2018 Report Share Posted January 15, 2018 I tried compiling and running denariusd on a Raspberry Pi zero W running the raspbian stretch lite image without GUI, using 512 meg RAM and 2 GB Swap. Compiling took over 10 hours, but finally succeeded. Running denariusd on a pi zero W also seems to work quite well for now, because RAM usage stays around 300 meg. 1 Quote Link to comment Share on other sites More sharing options...
buzzkillb Posted March 9, 2018 Report Share Posted March 9, 2018 for new 2.0.2.0 QT wallet, some notes for my newbness. sudo apt purge qt4* sudo apt-get install libqt5gui5 libqt5core5a libqt5dbus5 qttools5-dev qttools5-dev-tools export QT_SELECT=qt5 qmake -v 1 Quote Link to comment Share on other sites More sharing options...
eMiner49er Posted March 26, 2018 Report Share Posted March 26, 2018 I just got my 1st Raspberry and need to set it up. Thanks for posting this! Quote Link to comment Share on other sites More sharing options...
buzzkillb Posted April 22, 2018 Report Share Posted April 22, 2018 The steps I used from Carsen's post above. Then we just need to clone our Denarius repository: cd ~/Downloads git clone https://github.com/carsenk/denarius.git cd denarius Once inside our denarius directory, we need to tell Qt (qmake) to setup our makefile for compiling: sudo apt purge qt4* sudo apt-get install libqt5gui5 libqt5core5a libqt5dbus5 qttools5-dev qttools5-dev-tools export QT_SELECT=qt5 qmake -v qmake "USE_UPNP=1" "USE_QRCODE=1" denarius-qt.pro USE_LEVELDB=1 is required, USE_UPNP and USE_QRCODE are optional. Now we are finally ready to make! make -j4 (4 is the number of cores of your processor that you want to use for compiling, generally on the Pi3s you can use 4 cores) Once it is done building and if you didn't get any errors you will be able to run the following to launch the Denarius QT Wallet! ./Denarius Quote Link to comment Share on other sites More sharing options...
drcopperfield Posted June 3, 2018 Report Share Posted June 3, 2018 I am having trouble adding the BTC PPA When I enter this line sudo add-apt-repository ppa:bitcoin/bitcoin I receive this error Traceback (most recent call last):  File "/usr/bin/add-apt-repository", line 95, in <module>   sp = SoftwareProperties(options=options)  File "/usr/lib/python3/dist-packages/softwareproperties/SoftwareProperties.py", line 109, in __init__   self.reload_sourceslist()  File "/usr/lib/python3/dist-packages/softwareproperties/SoftwareProperties.py", line 599, in reload_sourceslist   self.distro.get_sources(self.sourceslist)    File "/usr/lib/python3/dist-packages/aptsources/distro.py", line 89, in get_sources   (self.id, self.codename)) aptsources.distro.NoDistroTemplateException: Error: could not find a distribution template for Raspbian/stretch  I've installed software-properties-common successfully before this Ideas? Quote Link to comment Share on other sites More sharing options...
Ghost Posted June 3, 2018 Report Share Posted June 3, 2018 1 hour ago, drcopperfield said: I am having trouble adding the BTC PPA When I enter this line sudo add-apt-repository ppa:bitcoin/bitcoin I receive this error Traceback (most recent call last):  File "/usr/bin/add-apt-repository", line 95, in <module>   sp = SoftwareProperties(options=options)  File "/usr/lib/python3/dist-packages/softwareproperties/SoftwareProperties.py", line 109, in __init__   self.reload_sourceslist()  File "/usr/lib/python3/dist-packages/softwareproperties/SoftwareProperties.py", line 599, in reload_sourceslist   self.distro.get_sources(self.sourceslist)    File "/usr/lib/python3/dist-packages/aptsources/distro.py", line 89, in get_sources   (self.id, self.codename)) aptsources.distro.NoDistroTemplateException: Error: could not find a distribution template for Raspbian/stretch  I've installed software-properties-common successfully before this Ideas? That is a PPA for Ubuntu specifically, not Raspbian. "Error: could not find a distribution template for Raspbian/stretch" So try installing db4.8 with: sudo apt-get install libdb++-dev or the equivalent command for your OS.  Quote Founder of BlockForums.org - PM me for any help - Join our Discord Server: https://discord.gg/UPpQy3n Link to comment Share on other sites More sharing options...
drcopperfield Posted June 4, 2018 Report Share Posted June 4, 2018 Thanks. Ended up doing full Berkeley install. I’m trying to compile the qt wallet now via Qt creator but receive an error regarding qmake. Do I need a specific kit or compiler? Currently only desktop kit installed. 1 Quote Link to comment Share on other sites More sharing options...
Ghost Posted June 5, 2018 Report Share Posted June 5, 2018 21 hours ago, drcopperfield said: Thanks. Ended up doing full Berkeley install. I’m trying to compile the qt wallet now via Qt creator but receive an error regarding qmake. Do I need a specific kit or compiler? Currently only desktop kit installed. You do need full QT 5, my post above should include all the necessary packages. Quote Founder of BlockForums.org - PM me for any help - Join our Discord Server: https://discord.gg/UPpQy3n Link to comment Share on other sites More sharing options...
drcopperfield Posted June 11, 2018 Report Share Posted June 11, 2018 On 6/6/2018 at 6:28 AM, Carsen said: You do need full QT 5, my post above should include all the necessary packages. Really not sure what I am doing wrong here... I manually installed the bitcoin repository info as I am using raspbian stretch On running make I receive the eventual error: Makefile:2440: recipe for target 'build/sendcoinsdialog.o' failed make: *** [build/sendcoinsdialog.o] Error 1 make: *** Waiting for unfinished jobs.... Makefile:2492: recipe for target 'build/coincontroldialog.o' failed make: *** [build/coincontroldialog.o] Error 1 I'm stumped 1 Quote Link to comment Share on other sites More sharing options...
Ghost Posted June 13, 2018 Report Share Posted June 13, 2018 On 6/11/2018 at 3:26 AM, drcopperfield said: Really not sure what I am doing wrong here... I manually installed the bitcoin repository info as I am using raspbian stretch On running make I receive the eventual error: Makefile:2440: recipe for target 'build/sendcoinsdialog.o' failed make: *** [build/sendcoinsdialog.o] Error 1 make: *** Waiting for unfinished jobs.... Makefile:2492: recipe for target 'build/coincontroldialog.o' failed make: *** [build/coincontroldialog.o] Error 1 I'm stumped Well it would be something with your deps that you have installed, I would go back from the beginning of the tutorial and go step by step again, maybe best to reinstall the OS on your Raspberry to know you are starting from scratch, probably from the ppa, try doing just a: sudo apt-get install libdb4.8++-dev If you could maybe paste more of your make compile here it would be helpful in knowing what the actual error it is that you are getting as well. 1 Quote Founder of BlockForums.org - PM me for any help - Join our Discord Server: https://discord.gg/UPpQy3n Link to comment Share on other sites More sharing options...
drcopperfield Posted June 14, 2018 Report Share Posted June 14, 2018 Thanks, will do. Would you suggest using the instructions as per buzzkillb's post, or no matter? I think it may be something to do with the qmake vs qt creator versions, which I've tried to reconcile but no luck yet. sudo apt purge qt4* sudo apt-get install libqt5gui5 libqt5core5a libqt5dbus5 qttools5-dev qttools5-dev-tools export QT_SELECT=qt5 qmake -v Quote Link to comment Share on other sites More sharing options...
drcopperfield Posted June 15, 2018 Report Share Posted June 15, 2018 On 6/13/2018 at 2:59 PM, Carsen said: Well it would be something with your deps that you have installed, I would go back from the beginning of the tutorial and go step by step again, maybe best to reinstall the OS on your Raspberry to know you are starting from scratch, probably from the ppa, try doing just a: sudo apt-get install libdb4.8++-dev If you could maybe paste more of your make compile here it would be helpful in knowing what the actual error it is that you are getting as well. Also I am using Raspbian stretch on a Pi 3+ Quote Link to comment Share on other sites More sharing options...
drcopperfield Posted June 24, 2018 Report Share Posted June 24, 2018 On 6/13/2018 at 2:59 PM, Carsen said: Well it would be something with your deps that you have installed, I would go back from the beginning of the tutorial and go step by step again, maybe best to reinstall the OS on your Raspberry to know you are starting from scratch, probably from the ppa, try doing just a: sudo apt-get install libdb4.8++-dev If you could maybe paste more of your make compile here it would be helpful in knowing what the actual error it is that you are getting as well. Carsen, I managed to successfully install denariusd on raspbian stretch, but after failing to get QT wallet working I decided to try on Ubuntu MATE. I keep receiving this error regarding QScroller. Any ideas?  fatal error: QScroller: No such file or directorycompilation terminated.Makefile:4299: recipe for target 'build/masternodemanager.o' failedmake: *** [build/masternodemanager.o] Error 1 Quote Link to comment Share on other sites More sharing options...
drcopperfield Posted June 24, 2018 Report Share Posted June 24, 2018 Never mind - somehow managed to get it sorted. I ended repeating the QT_SELECT=qt5 step, doing a ‘make clean’ and then following on from there. 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.