利用pybombs安装gnuradio
2019-3-2
1、清理系统上安装的老版本
sudo apt-get remove --purge gnuradio
sudo apt-get remove --purge uhd
同时,用如下命令检查是否还有残余
sudo apt list --installed | grep uhd
如果仍然还有残余,比如libuhd-dev等,用如下命令卸载
sudo apt-get autoremove libuhd-dev
//清除以前遗留的配方
pybombs recipes remove gr-recipes
pybombs recipes remove gr-etcetera
2、开始安装gnuradio
然后,安装pip
sudo apt-get install git python-pip
安装pybombs
sudo pip install git+https://github.com/gnuradio/pybombs.git
或
sudo pip install pybombs
清理目录
rm -rf ~/.pybombs
pybombs recipes add gr-recipes git+https://mirrors.tuna.tsinghua.edu.cn/pybombs/recipes/gr-recipes.git
pybombs recipes add gr-etcetera git+https://mirrors.tuna.tsinghua.edu.cn/pybombs/recipes/gr-etcetera.git
pybombs prefix init /home/ubuntu/sdr
sudo pybombs install gnuradio
安装完成后配置环境
cd SDR
source setup_env.sh
启动检验
gnuradio-companion
安装其他驱动
sudo pybombs install rtl-sdr hackrf bladeRF gr-osmosdr gr-bluetooth gr-ieee-80211
3、安装limesuite
sudo pybombs install gr-limesdr
sudo pybombs install soapysdr limesuite
4、查看limesdr-mini是否正常
//limesuite确认
#make sure that STREAM is one of the available connections
LimeUtil --info
#now run LimeUtil with --find to locate devices on the system
LimeUtil --find
#Example print output from LimeUtil
//soapysdr确认
#make sure that lime is one of the available factories
SoapySDRUtil --info
#now run SoapySDRUtil with --find to locate devices on the system
SoapySDRUtil --find=“driver=lime”
#Example print output from LimeUtil
Found device 0
addr = 241:1204
driver = lime
media = USB
module = STREAM
name = USB 3.0 (LimeSDR-USB)
5、安装gnss-sdr
sudo pybombs install gnss-sdr
为了能够更改gnss-sdr的配置变量,支持limeSDR设备,执行下列步骤
cd /home/opensourcesdr/.pybombs/recipes/gr-recipes
sudo gedit gnss-sdr.lwr
增加下面红色部分,首行和末行黑色部分是文件原有内容
gitbranch: next
vars: # We explicitly enable some subcomponents to make sure the build fails if they’re not working:
config_opt: " -DENABLE_DOXYGEN=$builddocs -DENABLE_OSMOSDR=ON "
inherit: cmake
保存后执行
sudo pybombs rebuild gnss-sdr
转自https://lists.gnu.org/archive/html/discuss-gnuradio/2013-09/msg00272.html
或者从源码开始安装
$ git clone https://github.com/gnss-sdr/gnss-sdr
$ cd gnss-sdr/build
$ git checkout next
$ cmake …
$ make
$ sudo make install
5、异常处理
1)安装编译gnuradio过程中出现如下错误:
pybombs Configuring incomplete, errors occurred!
利用如下命令安装boost解决问题
sudo apt-get install libboost-all-dev
2)在安装osmosdr时出现如下错误:
Building CXX object lib/CMakeFiles/gnuradio-osmosdr.dir/source_impl.cc.o
In file included from /home/ubuntu/SDR/src/gr-osmosdr/lib/bladerf/bladerf_source_c.h:26:0,from /home/ubuntu/SDR/src/gr-osmosdr/lib/source_impl.cc:72:
/home/ubuntu/SDR/src/gr-osmosdr/lib/bladerf/bladerf_common.h:291:50: error: ‘>>’ should be ‘> >’ within a nested template argument list
static std::list
解决方案是,升级gcc到最新版本,以下网址给出了当前可用的最新版本软件
https://launchpad.net/~ubuntu-toolchain-r/+archive/ubuntu/test
安装最新gcc,更新库
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt-get update
安装gcc-8
sudo apt-get install gcc-8 g+±8
更新系统依赖软件
sudo apt-get dist-upgrade
更新本地数据库
sudo updatedb
sudo ldconfig
查看本地gcc版本
locate gcc | grep -E “/usr/bin/gcc-[0-9]”
locate g++ | grep -E “/usr/bin/g+±[0-9]”
登记gcc版本
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-5 20
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-8 50
查询当前登记版本
sudo update-alternatives --query gcc
更改使用版本
sudo update-alternatives --config gcc
同样进行g++的操作
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g+±5 20
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g+±8 50
sudo update-alternatives --query g++
sudo update-alternatives --config g++
转载自网站https://blog.csdn.net/jiangjiang_jian/article/details/80694799
6、其他
改变文件的读写性质命令
sudo chmod 777 uhd_swigPYTHON_wrap.cxx
改变目录的读写性质命令
sudo chmod -R 777 /home/opensourcesdr/.local/share/flatpak
在系统中查找文件的命令
sudo find / -name “gnss-sdr”
https://blog.csdn.net/MakerCloud/article/details/81257953