Raspberry Pi / Linux - Install Commands

Post Reply
Sonix711
Posts: 5
Joined: Wed Oct 09, 2019 9:34 pm
os: linux

Raspberry Pi / Linux - Install Commands

Post by Sonix711 »

Hey :)

I've got a Raspberry Pi 4B thats already running Bitcoin Core (Release) as a Full Node, compiled from source code... but... I'm "kinda noob" with Linux really, although I do "alrite", obviously... :)

Anyway, I've also got a Raspberry Pi 3B+ (writing this using that right now) that I'm trying to install Namecoin Core (Legacy) Full Node onto... I didn't wanna crap up my BTC Node, although it would probably run both at same time...

I also already run a Full Node of Namecoin Core v0.3.80 (Legacy) on windows, and it works well - I figured that was also the version I should probably run on the RPI cos it uses the GUI rather than the command line to manage domain names...

I tried following the Ubuntu instructions (https://software.opensuse.org/download. ... mecoin-gui) for both xUbuntu 16.04 and for xUbuntu 14.04 , cos, like I said, "kinda noob"... :)

I couldn't get xUbuntu 16.04 commands to work, but I did get the following slightly modified xUbuntu 14.04 commands to work:-

---
sudo sh -c "echo 'deb [trusted=yes] http://download.opensuse.org/repositori ... ntu_14.04/ /' > /etc/apt/sources.list.d/home:p_conrad:coins.list"
wget -nv https://download.opensuse.org/repositor ... elease.key -O Release.key
sudo apt-key add - < Release.key
sudo apt-get update --allow-unauthenticated
---

But, when I ran "sudo apt-get install namecoin-gui", I got the following error:-

---
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
namecoin-gui : Depends: libboost-filesystem1.54.0 but it is not installable
Depends: libboost-program-options1.54.0 but it is not installable
Depends: libboost-system1.54.0 but it is not installable
Depends: libboost-thread1.54.0 but it is not installable
Depends: libminiupnpc8 (>= 1.6) but it is not installable
Depends: libssl1.0.0 (>= 1.0.1) but it is not installable
E: Unable to correct problems, you have held broken packages.
---

I tried installing each manually and they all gave the same basic error:-

---
Package libboost-program-options1.54.0 is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
E: Package 'libboost-program-options1.54.0' has no installation candidate
---


Originally I tried to install dependencies so I could compile Namecoin Core (Legacy) from source...

These commands installed without problems:-
---
sudo apt-get install build-essential
sudo apt-get install libgtk2.0-dev
sudo apt-get install libssl-dev
---


These commands failed:-
---
sudo apt-get install libdb4.7-dev
sudo apt-get install libdb4.7++-dev
---


Again, with the same errors...
---
Package libdb4.7++-dev is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
E: Package 'libdb4.7++-dev' has no installation candidate
---


Now, I think I'm pretty much stuck, so if anyone can help with a list of install / compile commands, or tell me what is required next or whatever, that would be awesome and very much appreciated !!! :)

I don't know how much of a nitemare it would be to run both my BTC and NMC Full Nodes on the same RPI(4B), but this is obviously why I haven't done so far... :)

My RPI4B runs the BTC Blockchain from a 2.5" 1TB Seagate Hybrid USB(3) powered hard disk, in case that helps anyone... :)

I can easily re-flash and swap this 128GB MicroSD card and reinstall my BTC Node if necessary... :)

Much appreciated - any and every comment / reply ... Sorry was bit of an essay... Fingers crossed for something good... :)

Cheers !!! :)

Sonix711
Posts: 5
Joined: Wed Oct 09, 2019 9:34 pm
os: linux

Re: Raspberry Pi / Linux - Install Commands

Post by Sonix711 »

PS - I'm just running "Stock Raspbian OS" on both RPI's...

OpenWRT and IPFire are quality firewall OS's for RPIs aswell... Check out ThePiHut for Raspberry Pi stuff, definitely !!! :)

PFSense is awesome firewall aswell, but only works on AES-NI enabled processors now - Mini-ITX.com are awesome too... :)

Welcome to check out my website - www.Node-Runner.co.uk - Free VB6 Windows apps I made - VB6 Source Code included - it might look bit pants, but as long as it works, that's what matters... !!! :) Check out my "GUI-RUNNER" app aswell.... and my "CONF-GENERATOR" app... :) Hope helpful too.... :)

Sonix711
Posts: 5
Joined: Wed Oct 09, 2019 9:34 pm
os: linux

Re: Raspberry Pi / Linux - Install Commands

Post by Sonix711 »

NMC-NAMETAB-CORE-BUILD-COMMANDS:-
===================================


!!! MOSTLY RINSED FROM /doc/build-unix.md !!!
-----------------------------------------------

!!! AS I SAID ABOVE, I'M "KINDA NOOB" WITH LINUX, SO RUN THIS ALL AT YOUR OWN RISK - IT MOSTLY WORKED FOR ME THO, CURRENTLY... !!! :)

!!! USING THE LATEST "NMC-NAMETAB" CODE AND DOCS - https://github.com/namecoin/namecoin-co ... r-name-tab

DOWNLOAD AS ZIP AND EXTRACT TO /home/pi/CRYPTO-HOME/NMC ...or something like that... :)


=====================================

INSTALL START:-
================



sudo apt-get install build-essential libtool autotools-dev automake pkg-config libssl-dev libevent-dev bsdmainutils python3



sudo apt-get install libboost-all-dev
OR
sudo apt-get install libboost-system-dev libboost-filesystem-dev libboost-chrono-dev libboost-program-options-dev libboost-test-dev libboost-thread-dev



sudo apt-get install software-properties-common


Berkley DB 4.8 FROM SOURCE OR DOWNLOAD:-
=========================================

ONLY REQUIRED FOR WALLET FUNCTIONALITY, BUT I GOT A COMPILER ERROR FURTHER DOWN, BUT COMPILES AND WORKS WITH WALLET DISABLED...



SOURCE:-
==========
sudo ./contrib/install_db4.sh 'pwd'

-----------
Berkeley DB
-----------
It is recommended to use Berkeley DB 4.8. If you have to build it yourself,
you can use [the installation script included in contrib/](/contrib/install_db4.sh)
like so

```shell
./contrib/install_db4.sh `pwd`
```

from the root of the repository.

**Note**: You only need Berkeley DB if the wallet is enabled (see the section *Disable-Wallet mode* below).

-----------

db4 build complete.

When compiling bitcoind, run `./configure` in the following way:

export BDB_PREFIX='/home/pi/db4'
./configure LDFLAGS="-L${BDB_PREFIX}/lib/" CPPFLAGS="-I${BDB_PREFIX}/include/" ...

------------


DOWNLOAD:-
============

**For Ubuntu only:** db4.8 packages are available [here](https://launchpad.net/~bitcoin/+archive/bitcoin).
You can add the repository and install using the following commands:

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


===========



sudo apt-get install libminiupnpc-dev



ZMQ dependencies (provides ZMQ API 4.x):
==========================================
sudo apt-get install libzmq3-dev


To build with Qt 5 (recommended) you need the following:

sudo apt-get install libqt5gui5 libqt5core5a libqt5dbus5 qttools5-dev qttools5-dev-tools libprotobuf-dev protobuf-compiler


Alternatively, to build with Qt 4 you need the following:

sudo apt-get install libqt4-dev libprotobuf-dev protobuf-compiler


ibqrencode (optional) can be installed with:

sudo apt-get install libqrencode-dev


Once these are installed, they will be found by configure and a bitcoin-qt executable will be
built by default.



Memory Requirements - INFO ONLY
----------------------------------------------

C++ compilers are memory-hungry. It is recommended to have at least 1.5 GB of
memory available when compiling Bitcoin Core. On systems with less, gcc can be
tuned to conserve memory with additional CXXFLAGS:


./configure CXXFLAGS="--param ggc-min-expand=1 --param ggc-min-heapsize=32768"

----------------------



RUN AUTOGEN:-
================

/home/pi/CRYPTO-HOME/NMC

sudo ./autogen.sh
--------------------------




NORMAL, CONFIGURE-COMMAND:-
===============================

sudo ./configure LDFLAGS="-L${BDB_PREFIX}/lib/" CPPFLAGS="-I${BDB_PREFIX}/include/" --enable-hardening --with-miniupnpc --disable-upnp-default --with-boost-libdir=/usr/lib/arm-linux-gnueabihf




NORMAL, WALLET-DISABLED, CONFIGURE-COMMAND - (2GB+ RAM):-
==================================================================

sudo ./configure LDFLAGS="-L${BDB_PREFIX}/lib/" CPPFLAGS="-I${BDB_PREFIX}/include/" --enable-hardening --with-miniupnpc --disable-upnp-default --disable-wallet --with-boost-libdir=/usr/lib/arm-linux-gnueabihf





LESS RAM, CONFIGURE-COMMAND:-
=================================

sudo ./configure CXXFLAGS="--param ggc-min-expand=1 --param ggc-min-heapsize=32768" LDFLAGS="-L${BDB_PREFIX}/lib/" CPPFLAGS="-I${BDB_PREFIX}/include/" --enable-hardening --with-miniupnpc --disable-upnp-default --with-boost-libdir=/usr/lib/arm-linux-gnueabihf



LESS RAM, WALLET-DISABLED, CONFIGURE-COMMAND - (LESS THAN 2GB RAM):-
======================================================================

sudo ./configure CXXFLAGS="--param ggc-min-expand=1 --param ggc-min-heapsize=32768" LDFLAGS="-L${BDB_PREFIX}/lib/" CPPFLAGS="-I${BDB_PREFIX}/include/" --enable-hardening --with-miniupnpc --disable-upnp-default --disable-wallet --with-boost-libdir=/usr/lib/arm-linux-gnueabihf



!!! I USED "LESS RAM, WALLET-DISABLED" (RPI3B+) AND "NORMAL, WALLET DISABLED" (RPI4B) COS ERROR BELOW WHEN COMPILING WITH WALLET ENABLED...



ERROR - INFO ONLY:-
====================

configure: error: libdb_cxx headers missing, Namecoin Core requires this library for wallet functionality (--disable-wallet to disable wallet functionality)

E: Unable to locate package libdb_cxx




Disable-wallet mode - INFO ONLY:-
--------------------------------------------
When the intention is to run only a P2P node without a wallet, bitcoin may be compiled in
disable-wallet mode with:

./configure --disable-wallet



Security - INFO ONLY:-
------------------------------
./configure --enable-hardening



MY CONFIGURE-END-OUTPUT:-
===========================

Options used to compile and link:
with wallet = no
with gui / qt = yes
qt version = 5
with qr = yes
with zmq = yes
with test = yes
with bench = yes
with upnp = yes
use asm = yes
debug enabled = no
werror = no

target os = linux
build os =

CC = gcc
CFLAGS = -g -O2
CPPFLAGS = -I/home/pi/db4/include/ -DHAVE_BUILD_INFO -D__STDC_FORMAT_MACROS -D_FILE_OFFSET_BITS=64
CXX = g++ -std=c++11
CXXFLAGS = --param ggc-min-expand=1 --param ggc-min-heapsize=32768
LDFLAGS = -L/home/pi/db4/lib/
ARFLAGS = cr




"MAKE" - COMPILE COMMAND:-
============================

sudo make
----

I THINK IT TOOK ABOUT 2 HOURS TO "MAKE" ... !!! :)



MY LAST PART OF MAKE COMMAND END OUTPUT:-
===========================================
----------
/usr/include/c++/8/bits/stl_uninitialized.h: In static member function 'static _ForwardIterator std::__uninitialized_copy<_TrivialValueTypes>::__uninit_copy(_InputIterator, _InputIterator, _ForwardIterator) [with _InputIterator = __gnu_cxx::__normal_iterator<const CTxOut*, std::vector<CTxOut> >; _ForwardIterator = CTxOut*; bool _TrivialValueTypes = false]':
/usr/include/c++/8/bits/stl_uninitialized.h:76:9: note: parameter passing for argument of type '__gnu_cxx::__normal_iterator<const CTxOut*, std::vector<CTxOut> >' changed in GCC 7.1
__uninit_copy(_InputIterator __first, _InputIterator __last,
^~~~~~~~~~~~~
/usr/include/c++/8/bits/stl_uninitialized.h:76:9: note: parameter passing for argument of type '__gnu_cxx::__normal_iterator<const CTxOut*, std::vector<CTxOut> >' changed in GCC 7.1
CXX libnamecoinconsensus_la-pubkey.lo
CXX script/libnamecoinconsensus_la-namecoinconsensus.lo
CXX script/libnamecoinconsensus_la-interpreter.lo
CXX script/libnamecoinconsensus_la-names.lo
CXX script/libnamecoinconsensus_la-script.lo
CXX script/libnamecoinconsensus_la-script_error.lo
CXX libnamecoinconsensus_la-uint256.lo
CXX libnamecoinconsensus_la-utilstrencodings.lo
CXXLD libnamecoinconsensus.la
/usr/bin/ar: `u' modifier ignored since `D' is the default (see `U')
make[2]: Leaving directory '/home/pi/CRYPTO-HOME/NMC/src'
make[1]: Leaving directory '/home/pi/CRYPTO-HOME/NMC/src'
Making all in doc/man
make[1]: Entering directory '/home/pi/CRYPTO-HOME/NMC/doc/man'
make[1]: Nothing to be done for 'all'.
make[1]: Leaving directory '/home/pi/CRYPTO-HOME/NMC/doc/man'
make[1]: Entering directory '/home/pi/CRYPTO-HOME/NMC'
make[1]: Nothing to be done for 'all-am'.
make[1]: Leaving directory '/home/pi/CRYPTO-HOME/NMC'
--------------


!!! Complete successfully as far as I can see... !!! :)



BASH SCRIPT TEXT FILE COMMAND:-
==================================

Create text file named "NMC-START" and paste text below into file...

---
#!/bin/bash
#NAMECOIN START SCRIPT

sudo /home/pi/CRYPTO-HOME/NMC/src/qt/namecoin-qt -conf=/home/pi/CRYPTO-HOME/namecoin.conf -datadir=/home/pi/CRYPTO-HOME/NMC-BC
---

Save file...

Right-click file, Properties - Make sure Script File Properties are set to allow execution...

Open Terminal window.

I Run:-
=========
sudo ./NMC-START


Namecoin-qt should run using the .conf file specified, saving the Blockchain in the datadir specified.


I got this error, but everything EXCEPT WALLET FUNCTIONALITY works (DISABLED WHEN COMPILING COS ERROR), as far as I can see...

-------
libEGL warning: DRI2: failed to authenticate
QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-root'
-------

I'LL POST IF I FIND ANY PROBS...

OTHERWISE, GOOD ENOUGH FOR ME... !!! :)

I'M PROBABLY GONNA TRY GET THIS WORKING ON MY RPI4B ASWELL / INSTEAD NOW I GOT THIS FAR... !!! :)

HOPE HELPS... !!! :)

Cheers... !!! :)
Last edited by Sonix711 on Fri Oct 11, 2019 12:54 am, edited 3 times in total.

Sonix711
Posts: 5
Joined: Wed Oct 09, 2019 9:34 pm
os: linux

Re: Raspberry Pi / Linux - Install Commands

Post by Sonix711 »

Updated previous post with Autogen command, etc...
Am now running BTC and NMC Full Nodes at same time on the same RPI4B (with USB3 Powered Hard Disk storing both Blockchains)...
Both Core's have wallets disabled, are up-to-date, and have incoming and outgoing connections...
I don't think I had to install anything extra - all dependencies were already installed cos of BTC Core dependencies, so basically straight for "Autogen", "Configure", and "Make" commands...

Namecoin / NMC Peer Port = 8334
Namecoin / NMC RPC Port = 8336

RPC ISN'T REQUIRED IF JUST USING INTERNET PEER CONNECTIONS:-
=============================================================
RPC now uses "RPCUser", "RPCPassword" AND "RPCAuth" for RPC Connections... BUT...Legacy client only uses "RPCUser" and "RPCPassword" - I updated using RPC from Windows Legacy Version to RPI NameTab Version, NO PROBLEMS :)

---------------

... Sorted... !!! :) I'll update if necessary, or whatever... Comments / replies still welcome...

Hope helpful / useful - for either Namecoin OR Bitcoin Full Node - ITS BASICALLY THE SAME !!! :)

Cheers... !!! :)

biolizard89
Posts: 2001
Joined: Tue Jun 05, 2012 6:25 am
os: linux

Re: Raspberry Pi / Linux - Install Commands

Post by biolizard89 »

Glad to hear you got things working. FWIW, current Namecoin Core releases should work fine out of the box on ARM (we even have Gitian binaries for ARM). Let us know if there's anything else we can help with.
Jeremy Rand, Lead Namecoin Application Engineer
NameID: id/jeremy
DyName: Dynamic DNS update client for .bit domains.

Donations: BTC 1EcUWRa9H6ZuWPkF3BDj6k4k1vCgv41ab8 ; NMC NFqbaS7ReiQ9MBmsowwcDSmp4iDznjmEh5

Sonix711
Posts: 5
Joined: Wed Oct 09, 2019 9:34 pm
os: linux

Re: Raspberry Pi / Linux - Install Commands

Post by Sonix711 »

Hey :)
Sorry, didnt know you'd posted...
I just had a look at the downloads again - I downloaded "namecoin-0.13.99-aarch64-linux-gnu.tar.gz" , extracted the internal file "namecoin-0.13.99-aarch64-linux-gnu.tar" , and extracted that... I take it the file "\bin\test_namecoin" is the QT... :)

When I did my original compile that I'm now using, I had to "./configure " with "--disable-wallet" option at build time cos it errored:-

configure: error: libdb_cxx headers missing, Namecoin Core requires this library for wallet functionality (--disable-wallet to disable wallet functionality)
E: Unable to locate package libdb_cxx

I dunno if this is cos I need to perhaps uncomment the second download line in the "etc" "sources" list file... ??? :)

I haven't tried yet, but I assume... never assume... I assume that I still need to run the test QT with wallet disabled (using either command line or .conf file)... or fix my error... :)

Cheers for your reply... appreciate all your hard work... !!! :)

biolizard89
Posts: 2001
Joined: Tue Jun 05, 2012 6:25 am
os: linux

Re: Raspberry Pi / Linux - Install Commands

Post by biolizard89 »

Sonix711 wrote:
Thu Nov 07, 2019 2:56 pm
Hey :)
Sorry, didnt know you'd posted...
I just had a look at the downloads again - I downloaded "namecoin-0.13.99-aarch64-linux-gnu.tar.gz" , extracted the internal file "namecoin-0.13.99-aarch64-linux-gnu.tar" , and extracted that... I take it the file "\bin\test_namecoin" is the QT... :)
Ah, yes, I think Bitcoin Core doesn't build Bitcoin-Qt binaries for ARM in Gitian. Something to do with the Qt dependency not cross-compiling properly for ARM targets IIRC. Until upstream Bitcoin Core fixes this (not sure what the status is), you'll need to build from source if you want the Qt GUI. (test_namecoin isn't Namecoin-Qt, it's something used for unit tests I think.)

Cheers!
Jeremy Rand, Lead Namecoin Application Engineer
NameID: id/jeremy
DyName: Dynamic DNS update client for .bit domains.

Donations: BTC 1EcUWRa9H6ZuWPkF3BDj6k4k1vCgv41ab8 ; NMC NFqbaS7ReiQ9MBmsowwcDSmp4iDznjmEh5

Post Reply