Updated gnuradio Install Instructions

As some of you have noted, the installation instructions for gnuradio and HackRF contained in our Field Expedient SDR series no longer work. To remedy this I’ve created a set of installation scripts that automate nearly all of the steps required, updated for newer versions of gnuradio/uhd/osmosdr and supporting the Ubuntu 18.04 LTS.

The scripts install from specific releases and commits of the source code, so they should be much more stable than previous iterations of the instructions.


On an Ubuntu 18.04 installation perform the following:

  1. Open a new terminal (Ctl+Alt+t) and type:
    sudo apt -y install git
    mkdir -p install
    cd install
    git clone https://github.com/paulgclark/grc-install
    cd grc-install/install_scripts
    sudo ./grc_from_source.sh

    (This will install both gnuradio and the UHD drivers. It will take between 0.5 to 1.5 hours.)
  2. Open a new terminal and type:
    cd install/grc-install/install_scripts
    (This will install the hackrf tools and the osmocom blocks. It will take only a few minutes.)
  3. Open a third terminal and start gnuradio companion with:
  4. Depending on the hardware you have available, you can open the following flowgraphs inside gnuradio-companion to test your setup:

Installing gnuradio 3.8

By default the gnuradio install script installs version, the latest release before 3.8. If you want to try out the new version, simply type:
sudo ./grc_from_source.sh 3.8

Note that the osmocom team hasn’t yet updated the blocks used for interfacing with the HackRF such that they work with version 3.8 of gnuradio. I’ve instead used Igor Freire‘s fork of their repository (actually, it’s his fork of Mickey Vänskä‘s fork of the osmocom repo). Thanks to both Igor and Mickey!

Installation Scheme

One of the big benefits of the PyBOMBS scheme we originally used in the book was the fact that it installs everything to a target directory under your home directory, rather than doing a global install to root-owned directories. The environment is then loaded with a simple call to a setup_env.sh script generated by the install process (which is automatically added to your ~/.bashrc).

This means if something goes wrong, you can just rm -r the target directory and delete a single line from your .bashrc file. You can then start over without worrying about the previous install polluting your environment.

I’ve preserved this scheme in the new scripts as well. By default the scripts will use the following directory for the target:

If you want to use a different target, simply run the script with the new target directory as the second argument. If installing 3.7 this would be:
sudo ./grc_from_source.sh 3.7 ~/install2

For 3.8, it would be
sudo ./grc_from_source.sh 3.8 ~/install2

This installation flow also allows you to easily keep multiple versions of gnuradio on disk. You simply install 3.7 to one target directory and 3.8 to another. You then enable the setup_env.sh file corresponding to the one you want to use at any given moment.


I’ve tested these scripts on numerous laptops and believe I’ve worked out all the issues with both Ettus and HackRF hardware. If you do have an issue, please let me know on GitHub or via email.

6 thoughts on “Updated gnuradio Install Instructions”

  1. Avatar Robert says:

    Hi there!
    Could I make a shortcut for gnuradio-companion ?

    1. Paul Clark Paul Clark says:

      Hi Robert – If you mean an Ubuntu desktop shortcut, you may have issues if you don’t find a way to set the environment variable per your ~/.bashrc file. There are also times when it’s nice to be able to see the console output, and I sometimes find it easier to scroll through the terminal window I’ve used to invoke gnuradio-companion than the smaller console area in the tool itself.

  2. Avatar Erwin says:

    Dear Paul,
    I have just bought the first 3 books in color edition and received the volumes 2 and 3 today.
    When will you publish the 4th volume?
    Thanks and godspeed
    de Erwin

    1. Paul Clark Paul Clark says:

      Thanks so much, Erwin, for reading the books. We’ve made several different decisions about the future of the books after we published the first three. First, after drafting the Reverse Engineering volume, we decided to throw away what we had and first build a training for SDR app development with Python. The reasoning being that many more powerful reverse engineering techniques become available once you can interact with your SDR (and captured IQ files) programmatically rather than being working in GNU Radio Companion. Another factor, is that we’ve decided to move our training online, which has really captured our attention for much of this year. Although this was always our intent, the COVID situation has caused us to accelerate this project.

      All of which, I’m sorry to say, means we don’t have a firm date for Volume 4 (or Volume 5). I’m sorry for the wait.

  3. Avatar Erwin says:

    I have used this script to build on a Oracle VirtualBox Ubuntu 20.04 hosted on Windows10, for Adalm Pluto, and this works perfect so far. Now learning from the examples from Volume 2 of the Series.
    The build on a slow Internet connection took over 2 hours, an error cropped up in the documentation build part with Latex. No harm done as far as I can tell.

    1. Paul Clark Paul Clark says:

      Glad to hear it, Erwin! The documentation errors are harmless.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.