Sunday, July 10, 2016

Installing BTSync on Odroid-C2 Armbian

The Odroid-C2 is a powerful little device. Great bang for the buck. With its Gigabit Ethernet port and Quadcore 64bit processor. It would seem like an ideal candidate to setup a cheap home backup system using BTSync.

One little snag, the Odroid-C2 being 64bit, is ahead of the pack (most if not all other singleboard's, including the Pi 3 are 32 bit still). So, when trying to follow the Official Instructions to install BTSync, I got this error:

W: Failed to fetch http://linux-packages.getsync.com/btsync/deb/dists/btsync/InRelease Unable to find expected entry 'non-free/binary-arm64/
Packages' in Release file (Wrong sources.list entry or malformed file)

Unfortunately, BtSync doesn't yet provide a Arm64 binary, and, since its not open-sourced, you can't try and compile one yourself either.

Not to worry. Armbian/Debian provides an easy enough way to install and use the 32 bit binaries and run them in your 64bit Armbian OS.

First we enable armhf multi-arch support in the package manager:
sudo dpkg --add-architecture armhf
sudo apt-get update
Then we fixup the /etc/apt/sources.list file to explicitly limit BtSync's repo to armhf architecture. If you followed the official instruction, then a line like this got added to /etc/apt/sources.list.
deb http://linux-packages.getsync.com/btsync/deb btsync non-free
 Change it to this:
deb [arch=armhf] http://linux-packages.getsync.com/btsync/deb btsync non-free
 Re-run apt-get update so package manager becomes aware of those changes:
sudo apt-get update
Now you can do everything else as per the official instructions. E.g.
sudo apt-get install btsync

References