Uncategorized

How to install GNU Radio under Linix Ubuntu

Some of following needs installation in a virtual environment, such as venv virtual environment.

To install GNU Radio under Ubuntu, you have several options depending on your requirements (latest version vs stability, minimal install vs full features). Here’s a step-by-step guide for the most common methods:


✅ Method 1: Install from Ubuntu’s Package Manager (APT)

Pros:

  • Easy and fast
  • Stable

Cons:

  • Might not be the latest version

Steps:

sudo apt update
sudo apt install gnuradio

This installs GNU Radio along with dependencies like gr-osmosdr.

To verify:

gnuradio-companion

🆕 Method 2: Use PyBombs (for latest and modular install)

PyBombs is GNU Radio’s own package manager and build system.

Steps:

  1. Install prerequisites:
sudo apt install git python3-pip python3-setuptools python3-wheel cmake g++ libboost-all-dev
  1. Install PyBombs:
pip3 install --user pybombs
  1. Add ~/.local/bin to your PATH if it’s not already:
export PATH="$HOME/.local/bin:$PATH"
  1. Set up PyBombs:
pybombs auto-config
pybombs recipes add-defaults
  1. Create a prefix and install:
pybombs prefix init ~/gnuradio -a default -R gnuradio-default
  1. Activate:
source ~/gnuradio/setup_env.sh

To run GNU Radio Companion:

gnuradio-companion

🛠️ Method 3: Build from Source (for bleeding edge or custom modules)

Recommended if you:

  • Want the very latest features
  • Need to develop or modify GNU Radio

Use gr-recipes or clone directly:

sudo apt install git cmake g++ libboost-all-dev libgmp-dev swig python3-numpy python3-mako python3-sphinx \
python3-lxml doxygen libfftw3-dev libcomedi-dev libcppunit-dev libgsl-dev libusb-dev sdcc libsdl1.2-dev \
python3-wxgtk4.0 libqt5opengl5-dev liblog4cpp5-dev libzmq3-dev libvolk2-dev libqwt-qt5-dev libpython3-dev

Then:

git clone --recursive https://github.com/gnuradio/gnuradio
cd gnuradio
mkdir build
cd build
cmake ..
make -j$(nproc)
sudo make install
sudo ldconfig

🔎 Check Installation

Run:

gnuradio-companion

You should see the GNU Radio GUI start up.


📌 Tip for Ubuntu 22.04+ Users

If installing from APT and you encounter missing blocks or Python errors, try:

sudo apt install gr-osmosdr gnuradio-dev

And consider using PyBombs or source builds for more complete setups.


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.