Step-by-step: How to install GNU Radio on your Mac OS X with RTL-SDR support

Back to Aaron's home page.

(Last updated: May 2015)

Prerequisites

Procedure

  1. Download and install X11/XQuartz first. If you don't know what X11 is, then read about it, so you understand what you are installing.
  2. Install MacPorts next. Installation involves selecting your version of OS X on the MacPorts site and downloading the appropriate PKG file. This file contains the installer scripts and compressed installation files that are used to install MacPorts onto your hard drive. Remember, MacPorts is your friend here. MacPorts is a package manager. If you don't know what a package manager is, then check out this link to get up to speed: Terminal 101: Using MacPorts and Homebrew
  3. After successfully installing MacPorts, open a Terminal and type:

    echo $PATH

    After typing this command, I see the result:

    /opt/local/bin:/opt/local/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/usr/texbin

    Verify that /opt/local/bin:/opt/local/sbin is in your PATH (like that above).

    If you don't see /opt/local/bin:/opt/local/sbin in your PATH, then you will have to add it manually. Why? Because MacPorts is going to save executables in the /opt/local directory by default. When you run a command from the Terminal (i.e. the shell), the shell looks for the executable file using the directories listed in your PATH variable as a map. For convenience, adding directories to this environment variable means you do not have to be in the directory of the executable itself, each time you run it from the Terminal. Here is a good link on the subject: What it is and How to Modify the Shell Path in OSX 10.10 Yosemite using Terminal. If you need to add to the path, then follow the previous link's instructions for "Adding in a Permanent Location" with the command

    export PATH=/opt/local/bin:/opt/local/sbin:$PATH

  4. You will interact with MacPorts using the Terminal. You should be able to open up a new Terminal and type:

    port version

    If you get a "command not found" error then your path is not set correctly. In MacPorts, the word "port" refers to "portfile", which is a distribution of software that can be compiled and installed using MacPorts. To see a list of available ports, type the following at the Terminal:

    port list

    Let's check out a list of ports which contain the term "SDR" by typing the following at the Terminal:

    port search sdr

    We are going to download and install four of these ports: gnuradio, gqrx, gr-osmosdr, rtl-sdr
  5. Ok, let's finally install GNU Radio itself by opening the Terminal and typing the following:

    sudo port install gnuradio

    Look up "sudo Unix" if you don't know what the sudo command does. The installation may take an hour or two to complete. Do not close the terminal until the installation is finished.

    Check to see if gnuradio installed correctly by typing the following in the Terminal:

    gnuradio-config-info --version

    This should display the version of GNU Radio.
  6. Let's add RTL-SDR support. Type the following in the Terminal:

    sudo port install rtl-sdr

    You also want the OsmoSDR RTL-SDR source block for GNU Radio Companion. To download and install this, type the following in the Terminal:

    sudo port install gr-osmosdr

    For easy audio, also install a program called Sound eXchange by typing the following in the Terminal:

    sudo port install sox

  7. Finally, I recommend you install GQRX, which is a useful software defined radio receiver from http://gqrx.dk. Type the following in the Terminal:

    sudo port install gqrx

Take a test drive!

Congratulations! You are done (hopefully). It's time to verify that everything is downloaded and installed correctly.