Skip to content

Instantly share code, notes, and snippets.

@rocket-pig
Last active November 24, 2019 14:42
Show Gist options
  • Save rocket-pig/8cab271dd30b344446919a6a2fe88c77 to your computer and use it in GitHub Desktop.
Save rocket-pig/8cab271dd30b344446919a6a2fe88c77 to your computer and use it in GitHub Desktop.
gnunet from source on Ubuntu 19.04
# this got me start to finish on ubuntu 19.04
# after some 12 odd hours of hair pulling
# it was so tedious i recorded each step once i found
# the step, and got it to complete successfully.
# no promises it will work 'out of the box' for you.
# feel free to steal/revise/comment/gfy
sudo apt install git libtool libtool-bin autoconf autopoint \
build-essential libgcrypt-dev libidn11-dev zlib1g-dev \
libunistring-dev libglpk-dev miniupnpc libextractor-dev \
libjansson-dev libcurl4-gnutls-dev gnutls-bin libsqlite3-dev \
openssl libnss3-tools libmicrohttpd-dev libopus-dev libpulse-dev \
libogg-dev
mkdir ~/gnunet_installation
cd ~/gnunet_installation
git clone --depth 1 https://gnunet.org/git/gnunet.git
cd ~/gnunet_installation/gnunet
export GNUNET_PREFIX=/usr/local
./bootstrap
#ubuntu 19.04 apt is one microhttpd revision away. sry not sry
sed -iv 's/0.9.63/0.9.62/g' configure
sed -iv 's/0.9.63/0.9.62/g' configure.ac
./configure --prefix=$GNUNET_PREFIX --disable-documentation --with-microhttpd=/opt/libmicrohttpd
sudo addgroup gnunetdns
sudo adduser --system --group --disabled-login --home /var/lib/gnunet gnunet
sudo usermod -aG gnunet $USER
make -j$(nproc || echo -n 1)
# make says '...leaving dir [etcetc]' and so we gotta cd back in before install
cd ~/gnunet_installation/gnunet
sudo make install
libtool --finish /lib
libtool --finish /lib/gnunet
echo """#Gnunet barfs inexplicably, mumbling about config file being unreadable but its actually
#lack of having this set that causes the problem:""" | tee -a ~/.bashrc
echo "export GNUNET_PREFIX=/usr/local" | tee -a ~/.bashrc
#the whole config file. Ports had to be hard set or it wouldnt work
#they were using $GNUNET_PORT before, tried setting that, still wasnt connecting
#can definitely change 20202 to whatever port your heart desires
echo """
[arm]
SYSTEM_ONLY = NO
USER_ONLY = NO
[fs]
FORCESTART = NO
[nat]
ENABLE_UPNP = NO
BEHIND_NAT = YES
[transport-tcp]
PORT = 20202
ADVERTISED_PORT = 20202
[transport-udp]
PORT = 20202
BROADCAST = YES
[cadet]
TESTING_IGNORE_KEYS = ACCEPT_FROM;
""" > ~/.config/gnunet.conf
##it just goes on and on.
## i found this line in the log
##( read the log with 'tail -f ~/.cache/gnunet/*` )
## "vpn-9252 ERROR `gnunet-helper-vpn' is not SUID, refusing to run."
## which i got to go away with:
# sudo chmod a+s /usr/local/lib/gnunet/libexec/gnunet-helper-vpn
## getting gnunet-gtk compiled:
cd ~/gnunet_installation
git clone https://git.gnunet.org/gnunet-gtk.git/
sudo apt -y install libgtk-3-dev libgladeui-dev libgl1-mesa-dev
cd gnunet-gtk
./configure --prefix=$GNUNET_PREFIX --with-gnunet=$GNUNET_PREFIX
make
cd ~/gnunet_installation/gnunet-gtk
sudo make install
ldconfig
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment