FlightAware Discussions

How to Install Piaware v 3.7.2 on Ubuntu 18.04 (Bionic) & Ubuntu 19.04 (Disco) amd64 / Intel PC

SUMMARY

Distro dump1090-fa piaware Remarks
Ubuntu Bionic 18.04 (LTS) OK OK OK
Ubuntu Disco 19.04 OK OK after workaround Workaround done for cx_Freez-5.1.1
(due to MLAT fails and gives following warning:
Fatal Python error: initfsencoding: Unable to get the locale encoding)

STEP-BY-STEP METHOD

Click here for Ubuntu Bionic 18.04 (LTS)

dump1090-fa

sudo apt update 

sudo apt install -y git lighttpd 
sudo apt install -y build-essential debhelper dh-systemd 
sudo apt install -y libboost-system-dev libboost-program-options-dev  
sudo apt install -y libboost-regex-dev libboost-filesystem-dev libsoapysdr-dev  
sudo apt install -y soapysdr-module-rtlsdr librtlsdr-dev libusb-1.0-0-dev  
sudo apt install -y pkg-config libncurses5-dev libbladerf-dev  

git clone https://github.com/flightaware/dump1090.git dump1090-fa  
cd dump1090-fa  
sudo dpkg-buildpackage -b  
cd ../  
sudo dpkg -i dump1090-fa_3.7.2_*.deb  
sudo systemctl restart dump1090-fa  

(2) piaware

sudo apt update 

sudo apt install -y git devscripts build-essential debhelper 
sudo apt install -y tcl8.6-dev autoconf python3-dev python3-venv 
sudo apt install -y virtualenv dh-systemd zlib1g-dev tclx8.4 
sudo apt install -y tcllib tcl-tls itcl3 net-tools 
sudo apt install -y libboost-system-dev libboost-program-options-dev 
sudo apt install -y libboost-regex-dev libboost-filesystem-dev 

git clone https://github.com/flightaware/piaware_builder.git 
cd  piaware_builder 
./sensible-build.sh bionic

cd package-bionic 
sudo dpkg-buildpackage -b
cd ..
sudo dpkg -i piaware_3.7.2*.deb

sudo piaware-config feeder-id xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx 
sudo systemctl restart piaware  
.
Click here for Ubuntu Disco 19.04

(1) dump1090-fa

sudo apt update 

sudo apt install -y git lighttpd 
sudo apt install -y build-essential debhelper dh-systemd 
sudo apt install -y libboost-system-dev libboost-program-options-dev  
sudo apt install -y libboost-regex-dev libboost-filesystem-dev libsoapysdr-dev  
sudo apt install -y soapysdr-module-rtlsdr librtlsdr-dev libusb-1.0-0-dev  
sudo apt install -y pkg-config libncurses5-dev libbladerf-dev  

git clone https://github.com/flightaware/dump1090.git dump1090-fa  
cd dump1090-fa  
sudo dpkg-buildpackage -b  
cd ../  
sudo dpkg -i dump1090-fa_3.7.2_*.deb  
sudo systemctl restart dump1090-fa  

(2) piaware

sudo apt update 

sudo apt install -y git devscripts build-essential debhelper 
sudo apt install -y tcl8.6-dev autoconf python3-dev python3-venv 
sudo apt install -y virtualenv dh-systemd zlib1g-dev tclx8.4 
sudo apt install -y tcllib tcl-tls itcl3 net-tools 
sudo apt install -y libboost-system-dev libboost-program-options-dev 
sudo apt install -y libboost-regex-dev libboost-filesystem-dev 

git clone https://github.com/flightaware/piaware_builder.git 
cd  piaware_builder 
./sensible-build.sh bionic

cd package-bionic 

## Next two commands are Workaround for MLAT issue
sudo rm -rf cx_Freeze-5.1.1
git clone https://github.com/anthony-tuininga/cx_Freeze.git cx_Freeze-5.1.1

sudo dpkg-buildpackage -b
cd ..
sudo dpkg -i piaware_3.7.2*.deb

sudo piaware-config feeder-id xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx 
sudo systemctl restart piaware  

.

Are there any advantages/disadvantages to using Ubuntu over Stretch?

edit - I’m not trying to be cheeky. I’m probably going to make a new image for one of my PIs so I figured I’d ask.

  1. I have both Ubuntu amd64 and Debian amd64 installed on my Desktop through Oracle VM. I did not notice any significant advantage or disadvantage. It is matter of personal preference wheather to use Debian or Ubuntu.

  2. Ubuntu is Debian based.

This thread is for Ubuntu amd64 which is installed on Intel Desktop/Laptop. I have never installed Ubuntu on RPi

I’ve put Ubuntu Mate, which is Bionic 18.04, on a few PIs in the past, just never for piaware service. I guess kind of apples to oranges on the platform and flavors.

1 Like

Just to test, wrote Ubuntu-Mate 18.04 on a spare microSD card and slipped the card in RPi, connected monitor+keyboard+mouse, booted, configured, enabled SSH, then successfully installed piaware & dump1090-fa (package install) by method given here: https://flightaware.com/adsb/piaware/install.

1 Like

Very nice. I think this will be my first Pi4 project.

Well that didn’t work for me:

Installing ./doc/tcllauncher.n
make[2]: Leaving directory ‘/home/pi/piaware_builder/package-bionic/tcllauncher’
install -d /home/pi/piaware_builder/package-bionic/debian/piaware/usr/lib/piaware/helpers
install -t /home/pi/piaware_builder/package-bionic/debian/piaware/usr/lib/piaware/helpers dump1090/faup1090
/home/pi/piaware_builder/package-bionic/debian/venv/bin/python /home/pi/piaware_builder/package-bionic/debian/venv/bin/cxfre eze --target-dir=/home/pi/piaware_builder/package-bionic/debian/piaware/usr/lib/piaware/helpers /home/pi/piaware_builder/pac kage-bionic/debian/venv/bin/fa-mlat-client
/home/pi/piaware_builder/package-bionic/debian/venv/bin/python: can’t open file ‘/home/pi/piaware_builder/package-bionic/deb ian/venv/bin/cxfreeze’: [Errno 2] No such file or directory
make[1]: *** [debian/rules:66: install_mlat-client] Error 2
make[1]: Leaving directory ‘/home/pi/piaware_builder/package-bionic’
make: *** [debian/rules:88: binary] Error 2
dpkg-buildpackage: error: debian/rules binary subprocess returned exit status 2

Any ideas? Note that I already did tried your fix with alternate Freeze-5.1.1 at previous step.

Which distro you are using, Ubuntu Bionic (18), or Ubuntu Disco (19)?

The cx_Freeze-5.1.1 workaround is only for Ubuntu 19 Disco.

Disco, sorry I wasn’t clear…

Got to go to my daytime job now.

@SoNic67

I have tested it on Ubuntu Disco 19.04, works like a charm. Current version is 19.10, on which I have not tested the method.

The cause of problem may be any of these

  • Some of the dependencies did not get installed. Repeat commands to install dependencies and carefully watch the output.
  • Some of the files got corrupted during cloning of source code. Delete the cloned folder and issue the clone command again.
  • If above two do not solve the problem, then problem may be due to version of Ubuntu. Try older version 19.04

EDIT: Ignore above writeup. Read following:
Workaround commands:

sudo rm -rf cx_Freeze-5.1.1 
git clone https://github.com/anthony-tuininga/cx_Freeze.git cx_Freeze-5.1.1

Seems workaround’s first command worked, but second command did not work, resulting in following error message:

/home/pi/piaware_builder/package-bionic/debian/venv/bin/cxfreeze’: [Errno 2] No such file or directory

Repeate workaround commands, then check
ls piaware_builder/package-bionic
Does folder cx_Freeze-5.1.1 exist? If yes, then give this command:
sudo dpkg-buildpackage -b

If error message repeats, delete the folder piaware_builder, and repeat the whole process.

1 Like

install -t /home/pi/piaware_builder/package-bionic/debian/piaware/usr/lib/piaware/helpers dump1090/faup1090
/home/pi/piaware_builder/package-bionic/debian/venv/bin/python /home/pi/piaware_builder/package-bionic/debian/venv/bin/cxfreeze --target-dir=/home/pi/piaware_builder/package-bionic/debian/piaware/usr/lib/piaware/helpers /home/pi/piaware_builder/package-bionic/debian/venv/bin/fa-mlat-client
/home/pi/piaware_builder/package-bionic/debian/venv/bin/python: can’t open file ‘/home/pi/piaware_builder/package-bionic/debian/venv/bin/cxfreeze’: [Errno 2] No such file or directory
make[1]: *** [debian/rules:66: install_mlat-client] Error 2
make[1]: Leaving directory ‘/home/pi/piaware_builder/package-bionic’
make: *** [debian/rules:88: binary] Error 2
dpkg-buildpackage: error: debian/rules binary subprocess returned exit status 2

Seems some missing files in cloned source code.

Delete cloned directory piaware_builder and then start again from begining.

https://github.com/flightaware/piaware_builder/blob/master/README.md

Yesterday I installed Ubuntu 19.10 amd64, and found building piaware package fails when workaround mentioned for Ubuntu 19.04 are carried out, exactly like you have experienced.

I then deleted the cloned folder piaware_builder and repeated process again, but this time without any workaround for cx_Freez, and the package built successfully.

Further observations:

The piaware package builds successfully after following dependencies are installed, as mentioned on page https://github.com/flightaware/piaware_builder/blob/master/README.md

build-essential debhelper tcl8.6-dev autoconf python3-dev python3-venv dh-systemd libz-dev

However when this package is used to install piaware using sudo dpkg -i at the end there is a warning you have held broken package, and I had to run sudo apt --fix-broken install, which installed following packages, and then everything was OK

sudo apt --fix-broken install
.... .... ....
The following NEW packages will be installed:
  itcl3 net-tools tcl tcl-tls tcllib tclx8.4

CONCLUSION (Ubuntu 19.10):

(1) Do NOT carryout any workaround for cx_Freez.

(2) Install following dependencies before cloning & building.

## Package required for cloning the source code:
sudo apt install git

## Dependencies & tools specified in flightaware's github page for piaware_builder:
sudo apt install build-essential debhelper tcl8.6-dev autoconf python3-dev python3-venv dh-systemd libz-dev

## Additional dependencies required to avoid "broken install' warning:
sudo apt install itcl3 net-tools tcl tcl-tls tcllib tclx8.4

EDIT:

Dont use Workaround, package builds & installs :smile:, BUT :rage:

Nov 03 14:29:42 ubuntu19 piaware[2044]: Starting multilateration client: /usr/lib/piaware/helpers/fa-mlat-client --input-connect localhost:30005
Nov 03 14:29:42 ubuntu19 piaware[2044]: mlat-client(2186): Fatal Python error: initfsencoding: Unable to get the locale encoding
Nov 03 14:29:42 ubuntu19 piaware[2044]: mlat-client(2186): ImportError: invalid flags 1570553265 in 'encodings'
Nov 03 14:29:42 ubuntu19 piaware[2044]: mlat-client(2186): Current thread 0x00007fd1b4c46740 (most recent call first):
Nov 03 14:29:43 ubuntu19 piaware[2044]: got EOF from multilateration client
Nov 03 14:29:44 ubuntu19 piaware[2044]: fa-mlat-client exited with SIG SIGABRT

Use workaround, package fails to build :slightly_frowning_face:

QUIT UBUNTU DISCO

1 Like

I have tried the Bionic LTS, but the Ubuntu install it gave some errors on my Windows 10 VM.
I kinda abandoned the idea, thank you!

1 Like

Let us wait till Flightaware releases new version of piaware. I hope it will have cx_Freez bug fix for Ubuntu Disco.

1 Like

Why dont you try Debian 10 amd64? It starts up and runs faster than Ubuntu. Also Piaware and dump1090-fa build and run on it without any issues.

Current Stable Version: debian-10.1.0-amd64-netinst.iso
Download Page: https://cdimage.debian.org/debian-cd/current/amd64/iso-cd/
Direct download link: https://cdimage.debian.org/debian-cd/current/amd64/iso-cd/debian-10.1.0-amd64-netinst.iso

I have been using Ubuntu for about a decade.
Last year I installed Debian. I found it is much faster than Ubuntu.

I like Option “Install” better than “Graphical install”

1 Like

I didn’t. I tried Ubuntu over the Windows 10 Hyper-V Manager (on a desktop).
Well… it seemed to install everything except that it didn’t “see” my airspy device… not sure if the USB ports are redirected correctly.
I might need to get something better as my VM, like VMWare.

During installation, when you reach this screen, enable SSH

1 Like

Did you install Oracle_VM_VirtualBox_Extension_Pack?
Without it USB 2.0 & 3.0 are NOT enabled. See 2nd screenshot below.

image

.

.