Update and Install dependencies

Before building UHD and GNU Radio, you need to make sure that all the dependencies are first installed.

However, before installing any dependencies, you should first make sure that all the packages that are already installed on your system are up-to-date. You can do this from a GUI, or from the command-line, as shown below.

On Ubuntu systems, run:

 sudo apt-get update 

On Fedora 21 systems, run:

 sudo yum update 

On Fedora 22, 23, 24 and 25 systems, run:

 sudo dnf update 

Once the system has been updated, then install the required dependencies for UHD and GNU Radio.

On Ubuntu 18.10 systems, run:

 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.14-0 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 libncurses6-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 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 libqwtplot3d-qt5-dev pyqt4-dev-tools python-qwt5-qt4 cmake git 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 libqwt-dev libqwt6abi1 python-six libgps-dev libgps23 gpsd gpsd-clients python-gps python-setuptools 

On Ubuntu 18.04 systems, run:

 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.14-0 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 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 libqwtplot3d-qt5-dev pyqt4-dev-tools python-qwt5-qt4 cmake git 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 libqwt-dev libqwt6abi1 python-six libgps-dev libgps23 gpsd gpsd-clients python-gps python-setuptools 


On Ubuntu 17.04 systems, run:

 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 python-setuptools 


On Ubuntu 16.04 systems, run:

 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 libzmq-dev libzmq1 python-requests python-sphinx libcomedi-dev python-zmq python-setuptools 

On Ubuntu 15.04 and 15.10 systems, run:

 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-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 libqwt6 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-1.13-0v5 libboost-all-dev libusb-dev libusb-1.0-0-dev fort77 libsdl1.2-dev python-wxgtk2.8 git-core libqt4-dev python-numpy ccache python-opengl libgsl0-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 libzmq-dev libzmq1 python-requests python-sphinx libcomedi-dev python-zmq python-setuptools 

On Ubuntu 14.04 and 14.10 systems, run:

 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-0 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 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-wxgtk2.8 git-core libqt4-dev python-numpy ccache python-opengl libgsl0-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 libzmq1 libzmq-dev python-requests python-sphinx libcomedi-dev python-setuptools 

On Fedora 21 systems, run:

 sudo yum -y groupinstall "Engineering and Scientific" "Development Tools" "Software Development Tools" "C Development Tools and Libraries" sudo yum -y install fftw-devel cppunit-devel wxPython-devel boost-devel alsa-lib-devel numpy gsl-devel python-devel pygsl python-cheetah python-mako python-lxml PyOpenGL qt-devel qt qt4 qt4-devel PyQt4-devel qwt-devel qwtplot3d-qt4-devel libusbx-devel cmake git wget python-docutils cppzmq-devel PyQwt PyQwt-devel qwt-devel gtk2-engines xmlrpc-c-"*" tkinter orc orc-devel python-sphinx SDL-devel swig zeromq2-devel python-zmq comedilib comedilib-devel thrift-devel python-thrift scipy zeromq zeromq-devel 

On Fedora 22, 23, 24 and 25 systems, run:

 sudo dnf -y groupinstall "Engineering and Scientific" "Development Tools" "C Development Tools and Libraries" sudo dnf -y install fftw-devel cppunit-devel wxPython-devel boost-devel alsa-lib-devel numpy gsl-devel python-devel pygsl python-cheetah python-mako python-lxml PyOpenGL qt-devel PyQt4-devel qwt-devel qwtplot3d-qt4-devel libusbx-devel cmake python-docutils PyQwt PyQwt-devel gtk2-engines xmlrpc-c-"*" tkinter orc-devel python-sphinx SDL-devel swig perl-ZMQ-LibZMQ2 perl-ZMQ-LibZMQ2 zeromq zeromq-devel python-requests gcc-c++ doxygen zeromq-ada-devel cppzmq-devel perl-ZeroMQ amavisd-new-zeromq amavisd-new-snmp-zeromq php-zmq python-zmq czmq uwsgi-logger-zeromq comedilib comedilib-devel pygtk2 ncurses-"*" thrift-devel python-thrift scipy 

After installing the dependencies, you should reboot the system.

If the installation of the dependencies completes without any errors, then you can proceed to build and install UHD and GNU Radio.

Building and installing UHD from source code

UHD is open-source, and is hosted on GitHub. You can browse the code online at the link below, which points to version 3.14.0.0, which is the the latest release at the time of this writing.

There are several good reasons to build GNU Radio from source code, especially for doing development and prototyping. It it enables an easy way to customize the location of the installation, and to install multiple UHD versions in parallel, and switch between them. It also provides much more flexibility in upgrading and downgrading versions, and allows the user to modify the code and create customized versions, which could possibly include a patch or other bug-fix.

To build UHD from source code, clone the GitHub repository, check out a branch or tagged release of the repository, and build and install. Please follow the steps below. Make sure that no USRP device is connected to the system at this point.

First, make a folder to hold the repository.

 cd $HOME mkdir workarea-uhd cd workarea-uhd 

Next, clone the repository and change into the cloned directory.

 git clone https://github.com/EttusResearch/uhd cd uhd 

Next, checkout the desired UHD version. You can get a full listing of tagged releases by running the command:

 git tag -l 

Example truncated output of git tag -l:

$ git tag -l ... release_003_009_004 release_003_009_005 release_003_010_000_000 

Note: As of UHD Version 3.10.0.0, the versioning scheme has changed to be a quadruplet format. Each element and version will follow the format of: Major.API.ABI.Patch. Additional details on this versioning change can be found here.

After identifying the version and corresponding release tag you need, check it out:

 # Example: For UHD 3.9.5: git checkout release_003_009_005 
 # Example: For UHD 3.14.0.0 git checkout v3.14.0.0 

Next, create a build folder within the repository.

 cd host mkdir build cd build 

Next, invoke CMake to create the Makefiles.

 cmake ../ 

Next, run Make to build UHD.

 make 

Next, you can optionally run some basic tests to verify that the build process completed properly.

 make test 

Next, install UHD, using the default install prefix, which will install UHD under the /usr/local/lib folder. You need to run this as root due to the permissions on that folder.

 sudo make install 

Next, update the system's shared library cache.

 sudo ldconfig 

Finally, make sure that the LD_LIBRARY_PATH environment variable is defined and includes the folder under which UHD was installed. Most commonly, you can add the line below to the end of your $HOME/.bashrc file:

 export LD_LIBRARY_PATH=/usr/local/lib 

On Fedora 22/23/24/25 you will need to set the LD_LIBRARY_PATH to /usr/local/lib64.

 export LD_LIBRARY_PATH=/usr/local/lib64 

If the LD_LIBRARY_PATH environment variable is already defined with other folders in your $HOME/.bashrc file, then add the line below to the end of your $HOME/.bashrc file to preserve the current settings.

 export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib 

For Fedora 21/22/23/24/25

 export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib64 

For this change to take effect, you will need to close the current terminal window, and open a new terminal.

At this point, UHD should be installed and ready to use. You can quickly test this, with no USRP device attached, by running uhd_find_devices. You should see something similar to the following.

linux; GNU C++ version 4.8.4; Boost_105400; UHD_003.010.000.HEAD-0-g6e1ac3fc No UHD Devices Found 

Downloading the UHD FPGA Images

You can now download the UHD FPGA Images for this installation. This can be done by running the command uhd_images_downloader.

 $ sudo uhd_images_downloader 

Note: Since this installation is being installed to a system level directory (e.g. /usr/local), the uhd_images_downloader command requires sudo privileges.

Example ouput for UHD 3.13.3.0:

$ sudo uhd_images_downloader Images destination: /usr/local/share/uhd/images Downloading images from: http://files.ettus.com/binaries/images/uhd-images_003.010.003.000-release.zip Downloading images to: /tmp/tmpm46JDg/uhd-images_003.010.003.000-release.zip 57009 kB / 57009 kB (100%) Images successfully installed to: /usr/local/share/uhd/images 

Example output for UHD 3.13:

$ sudo uhd_images_downloader [INFO] Images destination: /usr/local/share/uhd/images [INFO] No inventory file found at /usr/local/share/uhd/images/inventory.json. Creating an empty one. 00006 kB / 00006 kB (100%) usrp1_b100_fw_default-g6bea23d.zip 19484 kB / 19484 kB (100%) x3xx_x310_fpga_default-g494ae8bb.zip 02757 kB / 02757 kB (100%) usrp2_n210_fpga_default-g6bea23d.zip 02109 kB / 02109 kB (100%) n230_n230_fpga_default-g494ae8bb.zip 00522 kB / 00522 kB (100%) usrp1_b100_fpga_default-g6bea23d.zip 00474 kB / 00474 kB (100%) b2xx_b200_fpga_default-g494ae8bb.zip 02415 kB / 02415 kB (100%) usrp2_n200_fpga_default-g6bea23d.zip 05920 kB / 05920 kB (100%) e3xx_e320_fpga_default-g494ae8bb.zip 15883 kB / 15883 kB (100%) n3xx_n310_fpga_default-g494ae8bb.zip 00506 kB / 00506 kB (100%) b2xx_b205mini_fpga_default-g494ae8bb.zip 18676 kB / 18676 kB (100%) x3xx_x300_fpga_default-g494ae8bb.zip 00017 kB / 00017 kB (100%) octoclock_octoclock_fw_default-g14000041.zip 04839 kB / 04839 kB (100%) usb_common_windrv_default-g14000041.zip 00007 kB / 00007 kB (100%) usrp2_usrp2_fw_default-g6bea23d.zip 00009 kB / 00009 kB (100%) usrp2_n200_fw_default-g6bea23d.zip 00450 kB / 00450 kB (100%) usrp2_usrp2_fpga_default-g6bea23d.zip 00142 kB / 00142 kB (100%) b2xx_common_fw_default-g3ff4186b.zip 00460 kB / 00460 kB (100%) b2xx_b200mini_fpga_default-g494ae8bb.zip 00319 kB / 00319 kB (100%) usrp1_usrp1_fpga_default-g6bea23d.zip 00009 kB / 00009 kB (100%) usrp2_n210_fw_default-g6bea23d.zip 11537 kB / 11537 kB (100%) n3xx_n300_fpga_default-g494ae8bb.zip 05349 kB / 05349 kB (100%) e3xx_e310_fpga_default-g494ae8bb.zip 00866 kB / 00866 kB (100%) b2xx_b210_fpga_default-g494ae8bb.zip [INFO] Images download complete. 

Building and installing GNU Radio from source code

As with UHD, GNU Radio is open-source and is hosted on GitHub. You can browse the code online at the link below, which points to version v3.7.13.4, which is the the latest release at the time of this writing.

Note: GNU Radio is currently transitioning from major branches of 3.7.x.x to 3.8.x.x. It is generally recommend at this time to use either the v3.7.13.4 or maint-3.7 branch of GNU Radio. The master branch includes many major changes such as converting to use Python 3 and may be unstable.


As with UHD, there are several good reasons to build GNU Radio from source code, especially for doing development and prototyping. It it enables an easy way to customize the location of the installation, and to install multiple GNU Radio versions in parallel, and switch between them. It also provides much more flexibility in upgrading and downgrading versions, and allows the user to modify the code and create customized versions, which could possibly include a patch or other bug-fix.

Similar to the process for UHD, to build GNU Radio from source code, clone the GitHub repository, check out a branch or tagged release of the repository, and build and install. Please follow the steps below. Make sure that no USRP device is connected to the system at this point.

First, make a folder to hold the repository.

 cd $HOME mkdir workarea-gnuradio cd workarea-gnuradio 

Next, clone the repository.

 git clone --recursive https://github.com/gnuradio/gnuradio 

Next, go into the repository and check out the desired GNU Radio version.

 cd gnuradio 

To checkout the v3.7.13.4 branch:

 git checkout v3.7.13.4 

Or to checkout the maint-3.7 branch:

 git checkout maint-3.7 

Next, update the submodules:

 git submodule update --init --recursive 

Next, create a build folder within the repository.

 mkdir build cd build 

Next, invoke CMake to create the Makefiles.

 cmake ../ 

Next, run Make to build GNU Radio.

 make 

Next, you can optionally run some basic tests to verify that the build process completed properly.

 make test 

Next, install GNU Radio, using the default install prefix, which will install GNU Radio under the /usr/local/lib folder. You need to run this as root due to the permissions on that folder.

 sudo make install 

Finally, update the system's shared library cache.

 sudo ldconfig 

At this point, GNU Radio should be installed and ready to use. You can quickly test this, with no USRP device attached, by running the following quick tests.

 gnuradio-config-info --version gnuradio-config-info --prefix gnuradio-config-info --enabled-components 

There is a simple flowgraph that you can run that does not require any USRP hardware. It's called the dialtone test, and it produces a PSTN dial tone on the computer's speakers. Running it verifies that all the libraries can be found, and that the GNU Radio run-time is working.

 python $HOME/workarea-gnuradio/gnuradio/gr-audio/examples/python/dial_tone.py 

You can try launching the GNU Radio Companion (GRC) tool, a visual tool for building and running GNU Radio flowgraphs.

 gnuradio-companion 

If "gnuradio-companion" does not start and complains about the PYTHONPATH environment variable, then you may have to set this in your $HOME/.bashrc file, as shown below.






Edit your .bashrc to export necessary environment variables. For this step, you will need to know where GNU Radio was installed. If you used PyBOMBS, this will be a directory called target; otherwise, this is likely the directory /usr/local. I will call this directory /path/to/gnuradio. Use your favorite editor (vi, nano, gedit, etc.) and add the following lines to ~/.bashrc:

PYTHONPATH=$PYTHONPATH:/path/to/gnuradio/lib/python2.7/dist-packages export PYTHONPATH LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/path/to/gnuradio/lib export LD_LIBRARY_PATH PATH=$PATH:/path/to/gnuradio/bin export PATH
 
 
VERSIONS I USED: UHD 3.12.0.0 ; GNURADIO MAINT3.7
GNURADIO MAINT3.7