|||
详细步骤见解压后的INSTALL文件
1. 编译环境:
- Basic Unix tools:
. tar (tape archiver)
. gzip (file compression/decompression tool)
. gmake
- Perl 5
- Fortran 90 compiler
- C++ compiler (e.g., gcc,c++)
- Qt 4 library (见解压后的INSTALL)
cd current directory
./configure (qstringlist.h 错误解决方法见参考2)
gmake
sudo gmake install
注:
如果在./configure阶段出现如下错误:
Basic XLib functionality test failed!
You might need to modify the include and library search paths by editing
QMAKE_INCDIR_X11 and QMAKE_LIBDIR_X11 in /home/zhu/Qt/qt-x11-opensource-src-4.5.2/mkspecs/Linux-g++
解决这个问题只需要几个库就可以了,实际上只要安装两个库:
sudo yum install libXau-devel
sudo yum install ibX11-devel (打印信息显示,该package已经安装)
sudo yum install libXext-devel
参考:http://blog.csdn.net/zhaole20094463/article/details/7252727
设置环境变量, 执行vi ~/.bashrc 添加如下内容:
export QTDIR=/usr/local/Trolltech/Qt-4.1.3/ ubuntu
export QTDIR= /usr/local/Trolltech/Qt-4.8.5 centos
export PARH=$PATH: $QTDIR/bin
export MANPATH=$QTDIR/doc/man
export LD_LIBRARY_PATH=$QTDIR/lib
source ~/.bashrc
至此:QT4安装完成
(验证QT 是否成功安装:运行 /usr/local/Trolltech/Qt-$version4/bin/designer)
--------------------------------------------------------------------------------------------------------------------------
2. BERNESE5.2 安装 (见 Installation of the software)
sh setup.sh ( ./setup.sh )
.....
采用默认目录等参数,部分过程如下:
CONFIGURATION OF THE BERNESE GNSS SOFTWARE
==========================================
0 ... Complete installation (Steps 1 to 5)
1 ... Update LOADGPS.setvar
2 ... Install online updates
3 ... Add a new user environment
4 ... Compile the menu
5 ... Compile the programs
6 ... Install the example campaign
7 ... ---
x ... Exit
选择0,安装1-5,提示安装sucessful 则安装成功,否则安装不成功,要找原因,看.log文件描述。
再选6
最后退出:x
我的安装4中menu有错误:
All compilation output is redirected into file
/home/yu/BERN52/MENU/MENUCOMP.log
#####################################
# Error compiling the Bernese menu! #
# Please check the log file... #
#####################################
查看/MENUCOMP.log文件,发现错误是:``menutils.cpp:30:18: 致命错误: zlib.h:没有那个文件或目录``
缺zlib.h,安装:
sudo apt-get install zlib1g-dev (Ubuntu12.04)
sudo yum install zlib-devel (Centos7)
再重新编译4,问题解决。
安装详细见参考四:
常见错误二: (105 /lib64/libz.so.1: could not read symbols)
vi /home/yu/BERN52/MENU/MENUCOMP.log
......
103 /usr/bin/ld: .obj/release/menutils.o: undefined reference to symbol 'uncompress'
104 /usr/bin/ld: note: 'uncompress' is defined in DSO /lib64/libz.so.1 so try adding it to the linker command line
105 /lib64/libz.so.1: could not read symbols: 无效的操作
106 collect2: 错误:ld 返回 1
107 make: [menu_tmp] 错误 1 (忽略)
对应错误是:
/home/yu/BERN52/MENU/menu.sh:行83: /home/yu/BERN52/MENU/menu: 没有那个文件或目录
解决方法:
方法1: 从一个已经安装成功的电脑拷贝menu这个可执行文件存放自己电脑安装对应位置,
*** 要查看文件权限,Linux下要更改权限 ***
鉴于系统版本兼容性,不一定都能成功解决这个bug,如果系统版本相同,基本是可以成功的,
另:如果是linux上安装的话,这个错误只是缺少menu,不能打开界面,但运用脚本是不受影响的,
2017-06-23:
选择5:Compile the programs之前,确认$X/EXE/makeake.pl 有可执行权限.
3. 在终端下输入G即可显示:
首先,需要将LOADGPS.setvar添加到.bashrc里面:
vi .bashrc
source /home/yu/BERN52/GPS/EXE/LOADGPS.setvar
source .bashrc
( 设置G启动: source /home/yu/BERN52/GPS/EXE/LOADGPS.setvar )
参考:
1. QT安装:http://ahangin.blog.163.com/blog/static/185255702011028101515150/
2. QT错误:http://blog.163.com/lucien_cc/blog/static/13029056220103395024173/
3. QT下载:http://download.qt.io/archive/qt/4.1/ http://download.qt.io/archive/qt/4.8/4.8.5/
http://www.cnblogs.com/emouse/archive/2013/01/28/2880142.html
4. BERNESE5.2安装:http://www.linuxidc.com/Linux/2010-10/29223.htm
http://www.geoampg.com/forum.php?mod=viewthread&tid=240
http://blog.sciencenet.cn/blog-51026-609358.html
http://www.cnblogs.com/debuging/p/3270436.html
Installing BERNESE 5.2 on OS X 10.9 Mavericks
http://www.ecgs.lu/gilles/blog/installing-bernese-5-2-on-os-x-10-9-mavericks/
**
安装中,第四/五步的 Compile the menu和Compile the programs最易出错,如果编译出错,一定要
仔细查看错误原因,log文件有记录
**
Archiver|手机版|科学网 ( 京ICP备07017567号-12 )
GMT+8, 2024-11-20 23:27
Powered by ScienceNet.cn
Copyright © 2007- 中国科学报社