1

Let's take a long list of dependencies required for GNU-Radio to install on Ubuntu 17.04. I elaborate this list below.

sudo apt-get -y install git swig cmake doxygen build-essential libboost-all-dev libtool libusb-1.0-0 libusb-1.0-0-dev libudev-dev libncurses5-dev libfftw3-bin libfftw3-dev libfftw3-doc libcppunit-1.13-0v5 libcppunit-dev libcppunit-doc ncurses-bin cpufrequtils python-numpy python-numpy-doc python-numpy-dbg python-scipy python-docutils qt4-bin-dbg qt4-default qt4-doc libqt4-dev libqt4-dev-bin python-qt4 python-qt4-dbg python-qt4-dev python-qt4-doc python-qt4-doc libqwt6abi1 libfftw3-bin libfftw3-dev libfftw3-doc ncurses-bin libncurses5 libncurses5-dev libncurses5-dbg libfontconfig1-dev libxrender-dev libpulse-dev swig g++ automake autoconf libtool python-dev libfftw3-dev libcppunit-dev libboost-all-dev libusb-dev libusb-1.0-0-dev fort77 libsdl1.2-dev python-wxgtk3.0 git-core libqt4-dev python-numpy ccache python-opengl libgsl-dev python-cheetah python-mako python-lxml doxygen qt4-default qt4-dev-tools libusb-1.0-0-dev libqwt5-qt4-dev libqwtplot3d-qt4-dev pyqt4-dev-tools python-qwt5-qt4 cmake git-core wget libxi-dev gtk2-engines-pixbuf r-base-dev python-tk liborc-0.4-0 liborc-0.4-dev libasound2-dev python-gtk2 libzmq3-dev libzmq5 python-requests python-sphinx libcomedi-dev python-zmq

This is an extremely long list of dependencies for and there are numerous occasions when APT hangs or complains saying one or two of the dependencies are not found.

How can we install a dependency that is not found by APT? What are the most widely accepted methods?

For e.g., a very good method is described in this answer where N0rbert makes an effort to extract the missing libliquid1d & libliquid1d-dev using a weird method I do not understand, extracting libraries from /mirrors.kernel.org. However, to date, when I type apt-get install libliquid1d on my Ubuntu 16.04 system, it still says it cannot find that library. Below is my console output:

 [sudo] password for user:
 Reading package lists... Done
 Building dependency tree
 Reading state information... Done
 E: Unable to locate package libliquid1d

So in this case, a user might search and find under https://packages.ubuntu.com/search?keywords=libliquid1d that this library exists within the Ubuntu ecosystem only for Artful, Bionic and Cosmic releases. So how about installing for other distributions?

Ubuntu packages search result

This is the question I have. What hacks are known/popular in the community when that case happens? I am interested in a generic method that works to install missing dependencies in Ubuntu distributions, if it exists. I hope my question is specific enough.

Thanks a lot for answers and views.

Zanna
  • 72,312
Denis
  • 337

1 Answers1

1

Maybe the dependencies are found on another version of Ubuntu or a version of Debian. Run this command to find out.

sudo apt install devscripts  
rmadison -u ubuntu,debian first-package-name next-package-name last-package-name  

Replace the package-names in the above code with the names of the packages that you are searching for.

The problem with this command is that sometimes the package version number is part of the package name, so the rmadison program will only find packages that have the same version number in their names. To overcome this limitation I have written a bash shell script that allows for searching for packages that match part of the package name, e.g. match only the name part of the package name without needing to match the version number too.

  1. Create a shell script to query if the multiple packages exist named Open-multiple-URLs-in-Firefox.sh. The script contains the following code:

    #!/bin/bash
    while read line; do
        firefox --new-tab "https://packages.ubuntu.com/$line"
    done < packages.txt
    
  2. Make the script executable.

    chmod +x Open-multiple-URLs-in-Firefox.sh
    
  3. Create a file named packages.txt that contains the names of all the required dependency packages, each package on a separate line. Save packages.txt in the same directory as Open-multiple-URLs-in-Firefox.sh.

  4. Run the script.

    ./Open-multiple-URLs-in-Firefox.sh  
    

The webpage that has information about each required dependency package will open in a separate tab in Firefox.

In order to search for multiple packages in Debian replace https://packages.ubuntu.com/ in the shell script with https://packages.debian.org/search?keywords=

karel
  • 122,292
  • 133
  • 301
  • 332