gnuradio安装指南——详解ubuntu16.04下使⽤脚本安装gnuradiouhd。。。
Failed to find package 'python-wxgtk2.8' in known package repositories
SOME THINGS MAY NOT BUILD AS A RESULT
Failed to find package 'libzmq1-dev' in known package repositories
SOME THINGS MAY NOT BUILD AS A RESULT
依赖检测执⾏完之后,脚本⾃动从Git下载缺少的依赖⽂件、gnuradio和uhd和image并构造,这段时间不能断⽹,⽽且⽤时很长,得耐⼼等待,基本上没什么问题。
###三、测试篇
最后提⽰安装好了,并且提⽰设置python的路径环境变量(这个可以先不管,如果不⾏再添加就好)
You should probably set your PYTHONPATH to:
/usr/local/lib/python2.7/dist-packages
然后提⽰需要先登出系统再登录,所以可以注销后登录也可以重启,
然后运⾏声卡测试程序安装是否完成,进⼊声卡实例⽬录
cd /usr/local/share/gnuradio/examples/audio
然后查看对应⽬录下的⽂件
ls
显⽰如下
运⾏dial_tone.py,即在终端输⼊
./dial_tone.py
显⽰如图
如果电脑声卡发出声⾳,那么恭喜你,说明PYTHONPATH的路径不⽤设置了,只需要输⼊Ctrl+C即可停⽌运⾏,如果这⼀步报错就需要定义环境变量PYTHONPATH路径,⽅法参考脚本源代码如下
if [ -d /usr/local/lib${type}/python${PYVER}/site-packages/gnuradio ]
then
PYTHONPATH=/usr/local/lib${type}/python${PYVER}/site-packages
fi
if [ -d /usr/local/lib${type}/python${PYVER}/dist-packages/gnuradio ]
then
PYTHONPATH=/usr/local/lib${type}/python${PYVER}/dist-packages
fi
博主的对应路径如下
所以设置成对应值即可(环境变量设置不会的话就百度⼀下)。
最后,输⼊
gnuradio-companion
就可以进⼊图形界⾯了
到此为⽌就实现了在ubuntu下使⽤脚本安装gnuradio了。
###四、安装过程中的脚本输出结果
px@px-ThinkPad-T450:~$ cd Desktop/build-gnuradio/
px@px-ThinkPad-T450:~/Desktop/build-gnuradio$ ls
px@px-ThinkPad-T450:~/Desktop/build-gnuradio$ sudo wget /files/build-gnuradio && sudo chmod a+x build-gnuradio && ./build-gnura dio
[sudo] password for px:
--2016-10-09 22:03:47-- /files/build-gnuradio
Resolving ()... 67.212.80.242
Connecting to ()|67.212.80.242|:80... connected.
HTTP request sent, 200 OK
Length: 41528 (41K) [text/plain]
Saving to: ‘build-gnuradio’
build-gnuradio 100%[===================>] 40.55K 62.6KB/s in 0.6s
2016-10-09 22:03:49 (62.6 KB/s) - ‘build-gnuradio’ saved [41528/41528]
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
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.
NOTE: if you run into problems while running this script, you can re-run it with
the --verbose option to produce lots of diagnostic output to help debug problems.
This script has been written to anticipate some of the more common problems one might encounter building ANY large, complex software package. But it is not pefect, and there are certainly some situations it could encounter that it cannot deal with gracefully. Altering the system configuration from something reasonably standard, removing parts of the filesystem, moving system libraries around arbitrarily, etc,
it likely cannot cope with. It is just a script. It isn't intuitive or artificially
intelligent. It tries to make life a little easier for you, but at the end of the day
if it runs into trouble, a certain amount of knowledge on your part about
system configuration and idiosyncrasies will inevitably be necessary.
Proceed?y
Starting all functions at: Sun Oct 9 22:03:50 CST 2016
SUDO privileges are required
Do you have SUDO privileges?y
Continuing with script
Installing prerequisites.
====> THIS MAY TAKE QUITE SOME TIME <=====
Checking for package libqwt6
Checking for package libfontconfig1-dev
Checking for package libxrender-dev
Checking for package libpulse-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
git使用详解Checking for package libusb-dev
Checking for package libusb-1.0-0-dev
Checking for package fort77
Checking for package libsdl1.2-dev
Checking for package python-wxgtk2.8
Failed to find package 'python-wxgtk2.8' in known package repositories
SOME THINGS MAY NOT BUILD AS A RESULT
Checking for package git-core
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-mako
Checking for package python-lxml
Checking for package doxygen
Checking for package qt4-default
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 python-qwt5-qt4
Checking for package cmake
Checking for package git-core
Checking for package wget
Checking for package libxi-dev
Checking for package python-docutils
Checking for package gtk2-engines-pixbuf
Checking for package r-base-dev
Checking for package python-tk
Checking for package liborc-0.4-0
Checking for package liborc-0.4-dev
Checking for package libasound2-dev
Checking for package python-gtk2
Checking for package libzmq
Checking for package libzmq-dev
Checking for package libzmq1
Checking for package libzmq1-dev
Failed to find package 'libzmq1-dev' in known package repositories
SOME THINGS MAY NOT BUILD AS A RESULT
Checking for package python-requests
Checking for package python-sphinx
Checking for package comedi-dev
Checking for package python-zmq
Checking for package libncurses5
Checking for package libncurses5-dev
Checking for package python-wxgtk3.0
Done checking packages
Checking for library libusb ...Found library libusb
Checking for library libboost ...Found library libboost
Checking for library libcppunit ...Found library libcppunit
Checking for library libfftw ...Found library libfftw
Checking for library libgsl ...Found library libgsl
Done
This script will fetch Gnu Radio version 3.7/maint from the repositories, along with compatible
extras.
Is this OK?y
Fetching various packages (Gnu Radio, UHD, gr-osmosdr, gr-iqbal, etc)
via the Internet
=======> THIS MAY TAKE QUITE SOME TIME <=========
Fetching Gnu Radio Done
Fetching UHD Fetching rtl-sdr (rtl-sdr, gr-osmosdr, gr-iqbal, hackrf, bladeRF and airspy) via GIT
Done
Starting function uhd_build at: Sun Oct 9 22:19:20 CST 2016
=============> THIS WILL TAKE SOME TIME <=============
Done building/installing UHD
Done function uhd_build at: Sun Oct 9 22:41:51 CST 2016
Starting function firmware at: Sun Oct 9 22:41:51 CST 2016
Images destination: /usr/local/share/uhd/images
Downloading images from: us/binaries/images/uhd-images_003.010.000.000-36-g967897e0.zip Downloading images to: /tmp/tmpIPdGH_/uhd-images_003.010.000.000-36-g967897e0.zip
59860 kB / 59860 kB (100%)
Images successfully installed to: /usr/local/share/uhd/images
Done function firmware at: Sun Oct 9 22:42:33 CST 2016
Starting function gnuradio_build at: Sun Oct 9 22:42:33 CST 2016
/usr/local/lib already in f.d
Building
=========> THIS WILL TAKE QUITE A WHILE <=============
...Doing cmake
...Cmaking
...Building
...Installing
Done building and installing Gnu Radio
GRC freedesktop icons install ...Done
Done function gnuradio_build at: Mon Oct 10 00:03:17 CST 2016
Starting function rtl_build at: Mon Oct 10 00:03:17 CST 2016
Done building rtl-sdr
Done building hackrf
Done building gr-iqbal
Done building bladeRF
Done building airspy
Done building gr-osmosdr
Done building/installing rtl-sdr/gr-osmosdr
Done function rtl_build at: Mon Oct 10 00:06:15 CST 2016
Starting function mod_groups at: Mon Oct 10 00:06:15 CST 2016
********************************************************************************
This script has just modified /etc/group to place your userid '('$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 use the USRP1 device, you will need to use: sudo usermod -a -G usrp userid
For each userid you wish to allow access to the usrp
********************************************************************************
Further
Done function mod_groups at: Mon Oct 10 00:06:16 CST 2016
Starting function mod_udev at: Mon Oct 10 00:06:16 CST 2016
udevd: no process found
Done function mod_udev at: Mon Oct 10 00:06:16 CST 2016
Starting function mod_sysctl at: Mon Oct 10 00:06:16 CST 2016
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: Mon Oct 10 00:06:16 CST 2016
Starting function pythonpath at: Mon Oct 10 00:06:16 CST 2016
************************************************************
You should probably set your PYTHONPATH to:
/usr/local/lib/python2.7/dist-packages
Using:
export PYTHONPATH=/usr/local/lib/python2.7/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: Mon Oct 10 00:06:16 CST 2016
Starting function extras at: Mon Oct 10 00:06:16 CST 2016
Done function extras at: Mon Oct 10 00:06:16 CST 2016
Done all functions at: Mon Oct 10 00:06:16 CST 2016
All Done
======================================================================= If you have found this script useful and time-saving, consider a
donation to help me keep build-gnuradio, simple_ra, SIDsuite,
meteor_detector, simple_fm_rcv, and multimode maintained and up to date.
A simple paypal transfer to mleech@ripnet is all you need to do.
======================================================================
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系QQ:729038198,我们将在24小时内删除。
发表评论