FlightAware Discussions

New SD Card... can't get Dump1090-mut running

debian/rules:30: recipe for target ‘binary’ failed
make: *** [binary] Error 2
dpkg-buildpackage: error: fakeroot debian/rules binary gave error exit status 2
— Installing /home/pi/dump1090/build/dump1090*.deb —
dpkg: error processing /home/pi/dump1090/build/dump1090*.deb (–install):
cannot access archive: No such file or directory
Errors were encountered while processing:
/home/pi/dump1090/build/dump1090*.deb

That’s the last few lines of the output when I ran the script this morning.

Looks like it failed on something

Here are the steps I have used on multiple installations to install PiAware 2.1-3 and dump1090-mutability 1.15~dev.
I have had no issues using this on Raspbian, Ubuntu, or Debian.
swiftbyte.com/articles/soft … -or-debian

If you need only dump1090-mutability 1.15~dev the following commands should get you running:



sudo apt-get install git build-essential debhelper librtlsdr-dev libusb-1.0-0-dev pkg-config
mkdir ~/build
cd ~/build
git clone https://github.com/mutability/dump1090.git
cd ~/build/dump1090
dpkg-buildpackage -b
sudo dpkg -i ~/build/dump1090-mutability_1.15~dev_*.deb


If you are adding the web interface a few more lines need ran:



sudo apt-get install lighttpd
sudo lighty-enable-mod dump1090
sudo /etc/init.d/lighttpd force-reload


As you can see it is really easy. Obj is doing a great job with this project.
Honestly it takes more time sifting through the links pointing to HOWTOs to find the instructions then it does to build and install the package. :slight_smile:

EDIT:
Changed sudo service lighttpd force-reload To sudo /etc/init.d/lighttpd force-reload.

During the build I get:

dpkg-shlibdeps: error: no dependency information found for /usr/lib/librtlsdr.so.0 (used by debian/dump1090-mutability/usr/bin/dump1090-mutability)
dh_shlibdeps: dpkg-shlibdeps -Tdebian/dump1090-mutability.substvars debian/dump1090-mutability/usr/bin/view1090-mutability debian/dump1090-mutability/usr/bin/dump1090-mutability returned exit code 2
debian/rules:30: recipe for target ‘binary’ failed
make: *** [binary] Error 2
dpkg-buildpackage: error: fakeroot debian/rules binary gave error exit status 2

Taking a guess here being the message we need is above the first line but I bet you compiled librtlsdr0 yourself.
If your trying to build dump1090-mutability skip the librtlsdr0 build steps and let the package builder take care of it.

Yep that would be it librtlsdr…

Try and get rid of what ever librtlsdr package or binaries that you built yourself or by following anyone elses instructions. Afterwards try the steps you should be fine. Ran into this problem the first time following tutorials out there. From what I understand the dump1090-mutability package builder will take care of this lib for you hence the reason you are getting this error when trying to build with a version already present.

Sorry about that, I’ll take a look at it, thanks for the report…

If your looking for a bash script to install dump1090-mutability1.5~dev I put one together and tested it on a fresh installation of Debian.
Being it worked on Debian I am sure it will work just as well on Raspbian. In fact its the same commands I used on my Raspbian setup.
I am a bit rusty when it comes to bash scripts so it may not be the prettiest thing but it gets the job done.

The script is located here:
gist.github.com/jprochazka/a03a0d9a39469cd26b58

The script basically uses the commands I posted earlier and will ask questions such as where to build the packages as well as if you want Lighttpd installed and configured or not.

I wouldn’t doubt you still run into the librtlsdr error using this script on your current set up. However this can be used on a fresh installation or your current one if you can get rid of the version of librtlsdr which is causing you problems currently.

The librtlsdr that’s interfering is possibly one that’s installed as part of the piaware sdcard image, IIRC that’s a manual build rather than a package install unfortunately. You can usually get away with removing the libraries and installing a packaged version instead. Recent FA dump1090 packages should be OK with that now as they use static linking to avoid a dependency on the shared libraries.

Just tried it, and the errors at the end of the script(didn’t parse through everything to see if there were more):

./install_dump1090-mutability.sh: line 87: cd: /home/pi/build/dump1090: No such file or directory
tail: cannot open `debian/changelog’ for reading: No such file or directory
dpkg-buildpackage: error: tail of debian/changelog gave error exit status 1

Installing the dump1090-mutability package…

dpkg: error processing /home/pi/a03a0d9a39469cd26b58/build/dump1090-mutability_1.15~dev_.deb (–install):
cannot access archive: No such file or directory
Errors were encountered while processing:
/home/pi/a03a0d9a39469cd26b58/build/dump1090-mutability_1.15~dev_
.deb

I think I was able to install v1.14… it just won’t run and the Flightaware packaged dump1090 continues to run, and I just can’t figure out how to swap them out(or why these compile scripts keep failing)

Lol, now we have battling bash scrips… Mind if I take some of the logic from yours and add it to mine?

Try running the commands I posted earlier manually and skip the whole script nonsense.

That error is likely from my script not making the specified build directory properly on Raspbian which is something I wont be able to look into right this second without a RPi around me to test it on. Like I said my scripting skills are a bit rusty. :blush:

LOL take it all if you like! I don’t mind sharing things such as this with everyone.
Honestly slapped it together as something to do to pass the time.

Thanks, left a comment on the gist, there is a hardcoded directory at line 87.

Yep that would do it. That’s exactly why slookabill was getting the path error.
Anyways that’s fixed now.

Thanks for the reports.

Question for Oliver (Please let me know if you prefer to be referred to as obj instead.)

For librtlsdr-dev does it matter if the package is pulled from your packaging/built from your sources versus the version from the raspbian repository?


pi@raspberrypi ~ $ sudo apt-cache policy librtlsdr-dev
librtlsdr-dev:
  Installed: 0.5.4~git-1
  Candidate: 0.5.4~git-1
  Version table:
 *** 0.5.4~git-1 0
        100 /var/lib/dpkg/status
     0.5.3-3 0
        500 http://mirrordirector.raspbian.org/raspbian/ jessie/main armhf Packages


My script checks for the presence of the library via dpkg-query and if not there it will grab the pi-package branch from git and build a deb… Don’t want to be breaking anything if my process is incorrect.

It should not matter; but raspbian wheezy doesn’t package librtlsdr (which is the only reason my packaging exists)
The jessie packages should be fine.

Thanks again, as always…

I’m still working on a unified installer script, and I’m trying to take care of the librtlsdr.so library issues. SatSignal’s instructions to build from git clone git://git.osmocom.org/rtl-sdr.git and installs to /usr/local/lib/librtlsdr.*. PiAware’s image installs to /usr/lib/librtlsdr.so, and the deb installs to the /usr/lib/arm-linux-gnueabihf directory.

If I wanted to check to see if a user hand conflicting manually installed libraries, where would I look? I have the libraries in all three locations and buildpackage has no problems building dump1090-mutability.

(After this project, I’ll start on the SystemD parts, already have the timer done for the cron job…)

Any help, comments, criticisms, or just general ‘Why are you doing this?’ are heartily welcomed and encouraged.

https://gist.github.com/dschaper/d49d2d4d850fb2dd279d

Edit: Found it’s the /usr/lib/librtl’s that cause the dpkg choke, so it’s from the piaware image builds…

You are right the PiAware image builds will cause that choke.
Obj did mention in this post that the PiAware image uses a built rather then packaged librtlsdr setup.

Maybe try finding the compiled library and remove it before replacing it with the packaged version?
find / -name ‘librtlsdr.so’ 2>/dev/null

Just a guess dumped the PiAware image a couple weeks into feeding and havn’t looked back…

Looking at your script:
It looks like your cloning, building, and installing this: github.com/mutability/librtlsdr.git
Don’t do that. When you build the latest dump1090-mutability package it will handle that for you.


 dpkg-source --before-build dump1090
dpkg-checkbuilddeps: Unmet build dependencies: librtlsdr-dev
dpkg-buildpackage: warning: build dependencies/conflicts unsatisfied; aborting
dpkg-buildpackage: warning: (Use -d flag to override.)


I don’t want to get in bad graces with FA, would it be okay to continue this on github in the gist comments? I really do appreciate the pointers and help (and some of the code from your gist!)