目录

1、安装UHD依赖库及UHD

2、安装GNU Radio3.9.3


1、安装UHD依赖库及UHD

总结自:USRP Hardware Driver and USRP Manual: Building and Installing UHD from source 以及 Building and Installing the USRP Open-Source Toolchain (UHD and GNU Radio) on Linux - Ettus Knowledge Base

先安装依赖库:

 sudo apt-get -y install autoconf automake build-essential ccache cmake cpufrequtils doxygen ethtool fort77 g++ gir1.2-gtk-3.0 git gobject-introspection gpsd gpsd-clients inetutils-tools libasound2-dev libboost-all-dev libcomedi-dev libcppunit-dev libfftw3-bin libfftw3-dev libfftw3-doc libfontconfig1-dev libgmp-dev libgps-dev libgsl-dev liblog4cpp5-dev libncurses5 libncurses5-dev libpulse-dev libqt5opengl5-dev libqwt-qt5-dev libsdl1.2-dev libtool libudev-dev libusb-1.0-0 libusb-1.0-0-dev libusb-dev libxi-dev libxrender-dev libzmq3-dev libzmq5 ncurses-bin python3-cheetah python3-click python3-click-plugins python3-click-threading python3-dev python3-docutils python3-gi python3-gi-cairo python3-gps python3-lxml python3-mako python3-numpy python3-numpy-dbg python3-opengl python3-pyqt5 python3-requests python3-scipy python3-setuptools python3-six python3-sphinx python3-yaml python3-zmq python3-ruamel.yaml swig wget

======================== BUG ========================

如果安装依赖过程中出现一下错误:

The following packages have unmet dependencies:  libasound2-dev : Depends: libasound2 (= 1.2.2-2.1ubuntu2.4

可以执行以下命令解决:

sudo dpkg -P --force-depends libasound2 && sudo apt-get -f install

参考链接:

Bug #264534 “broken package: libasound2-dev” : Bugs : alsa-lib package : UbuntuOn a fully updated Hardy system, I cannot install libasound2-dev. apt-get reports the following:-----------------------------------------------$ apt-get install libasound2-devSome packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming.Since you only requested a single operation it is extremely likely that the package ...https://bugs.launchpad.net/ubuntu/+source/alsa-lib/+bug/264534======================== END ========================

然后下载源代码:

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

或者在https://github.com/EttusResearch/UHD/tags里找到想要的版本下载后解压。

接着编译安装源代码,在源代码文件中依次输入以下命令:

cd uhd
cd host
mkdir build
cd build
# 如果想设置UHD的安装位置,则可使用-DCMAKE_INSTALL_PREFIX参数,如:cmake -DCMAKE_INSTALL_PREFIX=/opt/uhd ../   默认的安装位置为/usr/local/lib
cmake ../
make
make test # This step is optional
sudo make install

之后确认是否定义环境变量LD_LIBRARY_PATH,看该环境变量是否定义了包含安装了UHD的文件夹(若在上述步骤中使用cmake的默认参数,则此处默认为/usr/local/lib),并将该变量添加到.bashrc文件的后面:

#注意替换{your-prefix}为你的UHD的安装路径
export LD_LIBRARY_PATH={your-prefix}/lib:$LD_LIBRARY_PATH
例如:export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH

然后是下载 UHD FPGA 镜像文件,当连接USRP时用来烧录

sudo uhd_images_downloader

卸载UHD的方法:

在cd到uhd/host/build文件中输入以下指令即可

sudo make uninstall

2、安装GNU Radio3.9.3

首先是安装依赖:

总结自:UbuntuInstall - GNU Radio

(不同版本的Ubuntu所需的依赖不尽相同,其他版本的可查看上述链接):

GNU Radio3.8需要以下依赖

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 Radio3.9 除了以上依赖外还需要安装以下依赖:

sudo apt install python3-matplotlib libsndfile1-dev

然后必须先安装 volk 再安装 GNURadio,命令如下,顺序执行一般不会有问题:

cd
git clone --recursive https://github.com/gnuradio/volk.git
cd volk
mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=Release -DPYTHON_EXECUTABLE=/usr/bin/python3 ../
make
make test
sudo make install

接下来开始下载gnuradio的源码进行编译安装:

总结自:InstallingGR - GNU Radio

依次输入以下指令:

git clone https://github.com/gnuradio/gnuradio.git
cd gnuradio
git checkout maint-3.9
git submodule update --init --recursive
mkdir build
cd build
# 如果想设置GNU Radio的安装位置,则可使用-DCMAKE_INSTALL_PREFIX参数,默认的安装位置为/usr/local
cmake -DCMAKE_BUILD_TYPE=Release -DPYTHON_EXECUTABLE=/usr/bin/python3 ../
# 可在终端输入proc指令查询线程数,并替换下面命令中的n,如果直接-j,则只使用单线程
make -jn
sudo make install
sudo ldconfig

======================== BUG ========================

如果安装依赖过程中出现一下错误:

CMake Error at CMakeLists.txt:344 (find_package):By not providing "Findpybind11.cmake" in CMAKE_MODULE_PATH this project hasasked CMake to find a package configuration file provided by "pybind11",but CMake did not find one.Could not find a package configuration file provided by "pybind11" with anyof the following names:pybind11Config.cmakepybind11-config.cmakeAdd the installation prefix of "pybind11" to CMAKE_PREFIX_PATH or set"pybind11_DIR" to a directory containing one of the above files.  If"pybind11" provides a separate development package or SDK, be sure it hasbeen installed.

可以执行以下命令解决:

sudo apt install pybind11-dev

======================= END ========================

与安装UHD类似,这里还需要在.bashrc文件中添加PYTHONPATH环境变量:

#注意替换{your-prefix}为你的UHD的安装路径
export PYTHONPATH={your-prefix}/lib/{Py-version}/dist-packages:{your-prefix}/lib/{Py-version}/site-packages:$PYTHONPATH
例如:export PYTHONPATH=/usr/local/lib/python3/dist-packages:/usr/local/lib/python3/site-packages:$PYTHONPATH

添加完之后还需要执行一次 sudo ldconfig就可以啦~

在命令行中执行以下指令就可以启动gnuradio的gui界面啦~

gnuradio-companion

初始界面如下:

Ubuntu20.04安装UHD及GUN Radio3.9相关推荐

  1. 超详细 ubuntu18.04 安装 UHD 和 GNURadio

    1.版本号 系统环境:ubuntu18.04 UHD:v3.14.1.0 GNU radio: v3.9 2.参考链接 在参考本教程之前,建议浏览下列参考链接,对安装过程能初步判断对与错,也能明白其中 ...

  2. 优麒麟Ubuntu20.04安装各种问题

    优麒麟Ubuntu用了六年了,版本旧了,所以按照20.04版. 1.adobe-flashplugin的安装极其慢 慎重啊!需要好几个小时,无法忍受啊! 2.dpkg被中断的解决方法 关闭掉Ubunt ...

  3. ubuntu20.04 安装 Qt5.12步骤

    转载链接:ubuntu20.04 安装 Qt5.12_仙海寻波的博客-CSDN博客_ubuntu20.04安装qt第一步 下载 Qt5.12.9安装包使用清华镜像进行下载:https://mirror ...

  4. 了解Docker、Ubuntu20.04安装docker教程

    Docker 的前世今生 https://my.oschina.net/u/4126211/blog/4517028 Ubuntu20.04安装docker教程 https://blog.csdn.n ...

  5. ubuntu20.04安装ROS及常见问题

    ubuntu20.04安装ROS及常见问题 一.ubuntu安装参考(双系统) 1.ios镜像官网下载地址: https://releases.ubuntu.com/?_ga=2.239339907. ...

  6. Ubuntu20.04安装,并Linux微信等

    Ubuntu20.04安装,并Linux微信等 一.Ubuntu20.04双硬盘双系统安装 电脑状况:256G+260G双固态硬盘,其中256G(sda)分C.D盘安装win10,460G(sdb)硬 ...

  7. ubuntu20.04安装小鹤双拼输入法挂接音形改简体中文Rime

    ubuntu20.04安装小鹤双拼输入法挂接音形改简体中文Rime 方案1,按照这个挂接方法,原始的繁体等其他的也还在: 替换方案 方案2 修改成默认简体中文: 更改皮肤 设置-区域与语言-改成中文- ...

  8. 微星主板 Ubuntu20.04安装以及配置

    1 设置U盘启动 1)插入使用软碟通制作好的U盘,开机按del键进入BIOS: 2)Boot Option 中 选择U盘启动: 3)设置硬盘BBS(我也不知道是什么): 4)点击左边Settings, ...

  9. Ubuntu20.04安装NVIDIA显卡驱动、CUDA、CUDNN及突破NVENC并发限制

    1.查看当前系统版本 cat /proc/version 显示为: 2.查看当前显卡型号: sudo lshw -numeric  -C display 显示我的显卡型号为:GM107M[GeForc ...

最新文章

  1. C/C++ 中长度为0的数组
  2. ubuntu cmake交叉编译时报错:没有那个文件或目录
  3. leetcode 617. Merge Two Binary Trees | 617. 合并二叉树(Java)
  4. 金融科技监管何时才能完善?
  5. 前端学习(486):css选择器上
  6. Python oct 函数 - Python零基础入门教程
  7. c++调用求平方根函数_如何使用java语言求一个正整数的平方根?(不使用库函数)...
  8. python之路 《四》 字典
  9. 2 java内存模型是什么_java中内存模型是什么?有什么用?
  10. violate、内存屏障
  11. 如何解决出现问题,你的PIN不可用,单击以重新设置PIN
  12. (转载)虚幻引擎3--12掌握虚幻技术UnrealScript 代理
  13. 1063 Set Similarity (25 分) java 题解
  14. Pascal词法分析器用java实现
  15. 如何在html页面上画一条渐变线
  16. 计算机游戏物体运动代码,Flash游戏教程:控制物体运动三法 -电脑资料
  17. 【突然断电后电脑无法开机】
  18. 正交矩阵和一种简单基础的Gram-Schmidt斯密特正交化方法
  19. android报错必须64位,64位系统使用Android虚拟机问题
  20. 计算机专业硕士初次认定工程师,深圳职称初次认定条件(初级、中级)

热门文章

  1. 计算机毕业设计Java中国古诗词学习平台(源码+系统+mysql数据库+lw文档)
  2. MATLAB函数——highpass
  3. UNCTF2020部分writeup
  4. 使用Azure AD B2C为ASP.NET Core 设置登录/注册
  5. 【考研英语-基础-长难句】并列句
  6. word中 有注释标签吗_如何始终在Microsoft Word中显示注释行
  7. systemtap 生成火焰图
  8. 获取iPhone手机的内存信息
  9. 炭黑价格走势图|炭黑知名品牌简述
  10. 如此火爆,小程序“宠咖秀”能否借势成为宠物界的小红书?