安装GNU Radioredone
安装GNU Radio的典型方法有两种:
(1)通过build-gnuradio脚本安装最新版;
(2)自己下载相应版本的.tar.bz2文件,自行编译安装。
上述的方法均来源于:gnuradio/redmine/projects/gnuradio/wiki/InstallingGR
可按其提示的步骤执行。下面分别予以介绍。
(1)通过build-gnuradio脚本安装最新版
该脚本适用于Ubuntu和Fedora系统,一般情况下可一次性地完成GNU Radio和UHD的安装,并顺利通过测试。该方法适于基础较少的用户,安装过程简单方便,但是不利于我们深入地了解安装过程,因而即便安装成功,在今后如果出现程序运行上问题和错误,也同样需要很长的时间去寻找解决办法。
下面将以Ubuntu10.10系统为例,介绍GNU Radio的安装过程。
a.下载build-gnuradio安装脚本。
从www.sbrac/files/build-gnuradio处下载脚本文件。(直接链接另存为即可)
b.将脚本文件拷贝到主文件夹目录下,按照下面的命令依次操作即可。
wwfzs1990@wwfzs1990-laptop:~$ ./build-gnuradio
This script will install Gnu Radio from current GIT sources
You will require Internet access from the computer on which this
script runs. You will also require SUDO access. You will require
approximately 500MB of free disk space to perform the build.
This script will, as a side-effect, remove any existing Gnu Radio
installation that was installed from your Linux distribution packages.
It must do this to prevent problems due to interference between
a linux-distribution-installed Gnu Radio/UHD and one installed from GIT source.
The whole process may take up to two hours to complete, depending on the
capabilities of your system.
Proceed?y (需要输入y后,按回车)
Starting all functions at: 2012年 03月 08日星期四 07:45:31 CST
SUDO privileges are required
Do you have SUDO privileges?y (需要输入y后,按回车)
Continuing with script
[sudo] password for wwfzs1990:
Checking for package libfontconfig1-dev
Checking for package libxrender-dev
Checking for package libpul-dev
Checking for package swig
Checking for package g++
Checking for package automake
Checking for package autoconf
Checking for package libtool
Checking for package python-dev
Checking for package libfftw3-dev
Checking for package libcppunit-dev
Checking for package libboost-all-dev
objectionable
Checking for package libusb-dev
Checking for package libusb-1.0-0-dev
Checking for package fort77
Checking for package sdcc
Checking for package sdcc-libraries
Checking for package libsdl1.2-dev
Checking for package python-wxgtk2.8
Checking for package git-core
Checking for package guile-1.8-dev
Checking for package libqt4-dev
Checking for package python-numpy
Checking for package ccache
Checking for package python-opengl
Checking for package libgsl0-dev
Checking for package python-cheetah
Checking for package python-lxml
Checking for package doxygen
Checking for package qt4-dev-tools
Checking for package libusb-1.0-0-dev
Checking for package libqwt5-qt4-dev
Checking for package libqwtplot3d-qt4-dev Checking for package pyqt4-dev-tools
Checking for package python-qwt5-qt4
Checking for package cmake
Checking for package git-core
Checking for package wget
Checking for package sdcc
Checking for package python-docutils
Checking for package gtk2-engines-pixbuf
Checking for package python-tk
Checking for library libusb ...Found library libusb Checking for library libboost_ ...Found library libboost_ Checking for library libcppunit ...Found library libcppunit
Checking for library libguile ...Found library libguile
Checking for library libfftw ...Found library libfftw
Checking for library libgsl ...Found library libgsl
Done
Fetching Gnu Radio Done (根据网速的差异,此处可能要等很久)
Fetching UHD Done (同上)
Starting function uhd_build at: 2012年 03月 08日星期四 07:50:35 CST
Done building/installing UHD
Done function uhd_build at: 2012年 03月 08日星期四 08:03:53 CST
Starting function firmware at: 2012年 03月 08日星期四 08:03:53 CST
Fetching and installing FPGA/Firmware images
...Installing from:
...Copying into /usr/local/share/uhd
Done
Done function firmware at: 2012年 03月 08日星期四 08:04:04 CST
convenient是什么意思
Starting function gnuradio_build at: 2012年 03月 08日星期四 08:04:04 CST
/
usr/local/lib already in f.d
xyy
Building
...Doing cmake
...Cmaking (此处make需要很久)
...Building
...Installing
Done building and installing Gnu Radio
GRC freedesktop icons install ...Done
Done function gnuradio_build at: 2012年 03月 08日星期四 08:28:19 CST
Starting function mod_groups at: 2012年 03月 08日星期四 08:28:19 CST
Group 'usrp' already in /etc/group
********************************************************************************
This script has just modified /etc/group to place your urid '('$USER')' into group 'usrp' In order for this change to take effect, you will need to log-out and log back
in again. You will not be able to access your USRP1 device until you do this.
If you wish to allow others on your system to u the USRP1 device, you will need to u: sudo urmod -a -G usrp urid
For each urid you wish to allow access to the usrp
********************************************************************************
Further
Done function mod_groups at: 2012年 03月 08日星期四 08:28:19 CST
Starting function mod_udev at: 2012年 03月 08日星期四 08:28:19 CST
Done function mod_udev at: 2012年 03月 08日星期四 08:28:19 CST
Starting function mod_sysctl at: 2012年 03月 08日星期四 08:28:19 CST
Applying updates to /f
Group 'usrp' now has real-time scheduling privileges
You will need to log-out and back in again for this to
take effect
Done function mod_sysctl at: 2012年 03月 08日星期四 08:28:19 CST
Starting function pythonpath at: 2012年 03月 08日星期四 08:28:19 CST
************************************************************
You should probably t your PYTHONPATH to:
/usr/local/lib/python2.6/dist-packages
in your .bashrc or equivalent file prior to attempting to run
any Gnu Radio applications or Gnu Radio Companion.
*************************************************************
Done function pythonpath at: 2012年 03月 08日星期四 08:28:19 CST
Done all functions at: 2012年 03月 08日星期四 08:28:19 CST
All Done
wwfzs1990@wwfzs1990-laptop:~$ sudo gedit .bashrc
将下面两行内容添加到.bashrc文件的最后:
PYTHONPATH=/usr/local/lib/python2.6/dist-packages
export PYTHONPATH
然后保存退出
wwfzs1990@wwfzs1990-laptop:~$ source .bashrc
(2)自己下载相应版本的.文件,自行编译安装。
迷惑不解该方法虽然操作起来比较麻烦,但只要按照官网Wiki中的步骤一步步操作,也是比较方便的,同时还能加深自己对整个安装过程的理解。
整个流程参考:
gnuradio/redmine/projects/gnuradio/wiki/BuildGuide
a.安装依赖(Meet dependencies)
可在链接:
gnuradio/redmine/projects/gnuradio/wiki/UbuntuInstall#Maverick-1010
处找到GNU Radio在Ubuntu 10.10中所需要的依赖环境,列举如下:
sudo apt-get -y install libfontconfig1-dev libxrender-dev libpul-dev \
swig g++ automake autoconf libtool python-dev libfftw3-dev \
libcppunit-dev libboost-all-dev libusb-dev fort77 sdcc sdcc-libraries \
libsdl1.2-dev python-wxgtk2.8 git guile-1.8-dev \
libqt4-dev python-numpy ccache python-opengl libgsl0-dev \appetite
python-cheetah python-lxml doxygen qt4-dev-tools \
libqwt5-qt4-dev libqwtplot3d-qt4-dev pyqt4-dev-tools python-qwt5-qt4
b.下载源代码(Get the source code)
可在链接:
gnuradio/redmine/projects/gnuradio/files
处找到最近几个版本的GNU Radio的源代码,此处选择了gnuradio-3.4.来安装,因为其所包含的例程更多。
下载完之后可将其手动解压到主文件夹中,以便下一步进行安装。
注意
jennifer lawrence nude
虽然安装完成之后可以删除源代码,但最好能够保留,因为之后的卸载还需要在源代码所处的文件夹内进行。
c.编译、生成和安装(Compile、Build&Install)
打开终端,进入主文件夹下的gnuradio-3.4.2目录中,按下面的顺序执行命令:社会工作专业就业方向
./configure
make
make check
sudo make install
即可完成安装。
注意
cry on my shoulder铃声上述过程中可能每一步都会出现问题和错误,需要特别注意的是./configure那一步。
在完成./configure命令之后,会显示configure之后的结果,即哪些组件完成了配置,而哪些组件由于依赖的缺失而未能完成配置。configure之后正常的结果会如下所示:
*********************************************************************
广袤The following GNU Radio components have been successfully configured:
config
gruel
volk
gnuradio-core
usrp
usrp2
gr-usrp