UbuntuInstall: Difference between revisions

From GNU Radio
Jump to navigation Jump to search
No edit summary
Line 12: Line 12:


The rest of this page describes dependencies for building GNU Radio from source code.
The rest of this page describes dependencies for building GNU Radio from source code.
= Building GNU Radio on Ubuntu Linux =
GNU Radio works well on all Ubuntu versions from 10.04 upward. It is also possible to install GNU Radio on older releases of Ubuntu (see [[#Building_GNU_Radio_on_Legacy_Ubuntu]]). However, we may not be able to provide sufficient support for legacy OS.


== Install Dependencies ==
== Install Dependencies ==

Revision as of 22:15, 19 February 2022

There's generally no need to build GNU Radio from source code unless you want to modify GNU Radio rather than just using it. The recommended way to install GNU Radio on most platforms is using already compiled binary packages. Binary installation should be sufficient for most users, and certainly for anyone who is new to GNU Radio. However, if you have special requirements, or a binary package is not available for your system, you may need to install GNU Radio from source.

In short: on Ubuntu versions since 9.10, use:

sudo add-apt-repository ppa:gnuradio/gnuradio-releases
sudo apt-get update
sudo apt-get install gnuradio

See our PPA page for more details.

The rest of this page describes dependencies for building GNU Radio from source code.

Install Dependencies

The following command line scripts will install all the required dependencies. Before running them, you should ensure that the "Main" and "Universe" repositories are enabled in "Software Sources". See https://help.ubuntu.com/community/Repositories/Ubuntu for a complete description.

To execute the script, copy and paste the relevant command line into a terminal.

After installing dependencies you can continue with installing GR from source.

Notes

  • Mint 19.2 is based on Ubuntu 18.04. Mint 19.2 Cinnamon desktop installs gnome-terminal which may have to be uninstalled for non-gui flowgraphs to run properly. Mint 19.2 Mate does not install gnome-terminal by default.

Focal Fossa (20.04) through Impish Indri (21.10)

GNU Radio version 3.8.x with Python 3 support:

sudo apt install git cmake g++ libboost-all-dev libgmp-dev swig python3-numpy \
python3-mako python3-sphinx python3-lxml doxygen libfftw3-dev \
libsdl1.2-dev libgsl-dev libqwt-qt5-dev libqt5opengl5-dev python3-pyqt5 \
liblog4cpp5-dev libzmq3-dev python3-yaml python3-click python3-click-plugins \
python3-zmq python3-scipy python3-gi python3-gi-cairo gir1.2-gtk-3.0 \
libcodec2-dev libgsm1-dev

GNU Radio version 3.9.x additionally requires:

sudo apt install pybind11-dev python3-matplotlib libsndfile1-dev \
python3-pip libsoapysdr-dev soapysdr-tools
pip install pygccxml
pip install pyqtgraph

GNU Radio version 3.10.x and the 'main' branch additionally require:

sudo apt install libiio-dev libad9361-dev libspdlog-dev python3-packaging

Bionic Beaver (18.04) through Eoan Ermine (19.10)

GNU Radio version 3.8.x with Python 3 support:

sudo apt install git cmake g++ libboost-all-dev libgmp-dev swig python3-numpy \
python3-mako python3-sphinx python3-lxml doxygen libfftw3-dev \
libsdl1.2-dev libgsl-dev libqwt-qt5-dev libqt5opengl5-dev python3-pyqt5 \
liblog4cpp5-dev libzmq3-dev python3-yaml python3-click python3-click-plugins \
python3-zmq python3-scipy

GNU Radio version 3.7.x:

sudo apt install cmake git g++ libboost-all-dev python-dev python-mako \
python-numpy python-wxgtk3.0 python-sphinx python-cheetah swig libzmq3-dev \
libfftw3-dev libgsl-dev libcppunit-dev doxygen libcomedi-dev libqt4-opengl-dev \
python-qt4 libqwt-dev libsdl1.2-dev libusb-1.0-0-dev python-gtk2 python-lxml \
pkg-config python-sip-dev 

Note: GNU Radio 3.9 and up will build from source on Ubuntu 18 only if pybind11 is installed from source as well. Also, pybind11 packages are on the gnuradio-master PPA, so another option is to install pybind from the GR PPA then build gnuradio from source. GNU Radio 3.9 additionally requires:

sudo apt install python3-matplotlib libsndfile1-dev

Xenial Xerus (16.04)

Building GNU Radio 3.8.x is difficult on Ubuntu 16.04 due to various dependency issues (especially due to CMake and Python versions). Please consider using GNU Radio 3.7.x instead.

For GNU Radio 3.7.x:

sudo apt-get -y install git-core cmake g++ python-dev swig \
pkg-config libfftw3-dev libboost-all-dev libcppunit-dev libgsl0-dev \
libusb-dev libsdl1.2-dev python-wxgtk3.0 python-numpy \
python-cheetah python-lxml doxygen libxi-dev python-sip \
libqt4-opengl-dev libqwt-dev libfontconfig1-dev libxrender-dev \
python-sip python-sip-dev python-qt4 python-sphinx libusb-1.0-0-dev \
libcomedi-dev libzmq-dev 

Trusty Tahr (14.04)

sudo apt-get -y install git-core cmake g++ python-dev swig \
pkg-config libfftw3-dev libboost1.55-all-dev libcppunit-dev libgsl0-dev \
libusb-dev libsdl1.2-dev python-wxgtk2.8 python-numpy \
python-cheetah python-lxml doxygen libxi-dev python-sip \
libqt4-opengl-dev libqwt-dev libfontconfig1-dev libxrender-dev \
python-sip python-sip-dev

Then set the following environmental variable to use PyQT:

export PYTHONPATH=/opt/qt/lib/python2.7/dist-package

For older versions of Ubuntu see Old Ubuntu Deps