Raspberries are awesome. But setting up things can sometimes be a little messy. I wanted to install a working version of Silkaj (see the Duniter project, if you don’t know them yet, check them out, they rock!) and here is a full tutorial to get you going.
- a Raspberry Pi (mine is a version 3 but it should probably work on a 2 as well),
- Raspbian Jessie, but it would probably work on any other raspbian or even any Debian-based distribution,
- networking (obviously).
You will need to have libsodium and libffi already installed, as well as libssl and its development package, otherwise install them:
sudo apt-get install libsodium13 libsodium-dev libffi6 libffi-dev libssl-dev
Note that you do need the development packages because python’s installer will need to compile some dependencies with them later.
Check where libffi.pc has been installed:
find /usr -name "*libffi.pc*"
You need to add the path for libffi.pc to the python environment variable PKG_CONFIG_PATH. Check if that variable is empty or not, if it’s not empty, you need to APPEND the following instead of overwriting it of course (change the location of libffi.pc to the result of your previous command):
Installing Python 3.6 and pipenv
Because silkaj and its dependencies doesn’t run well with older versions of python, you need to install Python 3.6. Here is the recipe:
tar xzvf Python-3.6.0.tgz
sudo make install
The following needs to be done as root or with sudo (unless you want to install for your user only):
sudo python3.6 -m pip install --upgrade pip
sudo python3.6 -m pip install pynacl
sudo python3.6 -m pip install pipenv
Get Silkaj and prepare it
Type the following in your shell with any user:
git clone https://git.duniter.org/clients/python/silkaj.git
This last command actually starts a new shell in which silkaj can be run.
That’s it! You’re ready to run silkaj now: