需预先安装oracle客户端;以下类库,有的可能需要提前安装,有的则可能不必安装;总之多试几次,多看看log日志。
系统环境:ubuntu14.04
Tora版本:2.1.3
下载QScintilla-gpl-2.9.1-snapshot-3ff05a0ef88d.tar.gz
依次执行:
$sudo cp ~/下载/QScintilla-gpl-2.9.1-snapshot-3ff05a0ef88d.tar.gz /usr/local/software/
$sudo tar xzvf QScintilla-gpl-2.9.1-snapshot-3ff05a0ef88d.tar.gz
$sudo mv QScintilla-gpl-2.9.1-snapshot-3ff05a0ef88d qscintilla2.9.1
$cd qscintilla2.9.1/Qt4Qt5
$/usr/local/software/qt-4.8.7/bin/qmake qscintilla.pro
$sudo make
$sudo make isntall
然后再执行:$sudo apt-get install libqscintilla*
安装qscintilla在ubuntu下的相关类库。
获取tora的源代码
$sudo apt-get install dpkg-dev
$sudo apt-get source tora
要强调的是,在下载源码包前,必须确保安装了dpkg-dev(执行”apt-get install dpkg-dev”来安装),否则,
只会下载源码包的3个文件,但不会解压缩源码包。当然你也可以自己用dpkg-source命令去解压缩源码包。
安装具有依赖关系的相关软件包。使用”apt-get build-dep”命令可以主动获取并安装所有相关的软件包。
$sudo apt-get build-dep tora
之后,在/usr/local/software/tora-2.1.3下创建好可执行文件目录,进入下载的源码目录tora-2.1.3目录,
先执行
$sudo ./configure -h
--with-oracle=DIR enable support for Oracle (default ORACLE_HOME)
--with-oracle-includes=DIR
set oracle include dir (default ORACLE_HOME/subdirs)
--with-oracle-libraries=DIR
set oracle lib dir (default ORACLE_HOME/lib)
--with-instant-client=DIR
Path to your instant client. If you've unpacked
all the zip files to this folder, then this is
all you need to use an instant client.
Disables testing for ORACLE_HOME and tnsnames.
--with-oci-version=[8, 8I, 9I, 10G, 10G_R2, 11G]
this is the version of the client, not the database.
--with-qscintilla=DIR
Directory containing QScintilla 2
--with-qscintilla-includes=DIR
QScintilla header file location
--with-qscintilla-libraries=DIR
QScintilla library dir
--with-pcre[=prefix] compile xmlpcre part (via libpcre check)
--with-cppunit-prefix=PFX Prefix where CppUnit is installed (optional)
--with-cppunit-exec-prefix=PFX Exec prefix where CppUnit is installed (optional)
之后,执行
$sudo ./configure --prefix=/usr/local/software/tora-2.1.3 --with-oracle=$ORACLE_HOME --with-oracle-includes=/usr/include/oracle/12.1/client64 --enable-debug=ture
有错误就得查config.log。上面的命令是经过多次尝试而来,系统环境不同,之前安装的软件或类库也不同,命令也不尽相同。这里没有指定QT的相关目录配置,因为之前已经安装了qt的类库:$ sudo apt-get install qt-sdk
有一个没有找到QT LIB的警告,暂时不管。
执行
$sudo make
报错:
----------------------------------------------------------------------------
/tmp/packerbuild-0/tora/tora/src/tora-2.1.3/src/toextract.cpp: In member function ‘QString toExtract::generateHeading(const QString&, std::list<QString, std::allocator<QString> >&)’:
/tmp/packerbuild-0/tora/tora/src/tora-2.1.3/src/toextract.cpp:690:27: error: ‘gethostname’ was not declared in this scope
make[2]: *** [src/CMakeFiles/tora.dir/toextract.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [src/CMakeFiles/tora.dir/all] Error 2
------------------------------------------------------------------------------
解决:
diff -aur tora-2.1.3/src/toextract.h tora-2.1.3patched/src/toextract.h
--- tora-2.1.3/src/toextract.h 2010-02-02 10:25:43.000000000 -0800
+++ tora-2.1.3patched/src/toextract.h 2012-06-22 21:58:45.026286147 -0700
@@ -53,6 +53,7 @@
#include <qvariant.h>
//Added by qt3to4:
#include <QString>
+#include <unistd.h>
class QWidget;
class toConnection;
根据说明修改源文件,再编译。
$ sudo make clean
$ sudo ./autogen.sh
$sudo ./configure --prefix=/usr/local/software/tora-2.1.3 --with-oracle=$ORACLE_HOME --with-oracle-includes=/usr/include/oracle/12.1/client64 --enable-debug=ture
$ sudo make
又报错:
-----------------------------------------------------------------------------
tora-toawr.o: In function `toAWR::~toAWR()':
/home/jjl/tora-2.1.3/src/toawr.cpp:381: undefined reference to `vtable for toAWR'
/home/jjl/tora-2.1.3/src/toawr.cpp:381: undefined reference to `vtable for toAWR'
---------------------------------------------------------------------------
解决:
修改源码src中的文件
src/Makefile.am
BUILT_SOURCES = \
moc_toabout.cpp \
moc_toalert.cpp \
moc_toanalyze.cpp \
moc_toawr.cpp \
moc_tobackup.cpp \
#其中moc_toawr.cpp \ 这一行是需要添加的。
修改完成后,再执行
$ sudo make clean
$ sudo ./autogen.sh
$ sudo ./configure --prefix=/usr/local/software/tora-2.1.3 --with-oracle=$ORACLE_HOME --with-oracle-includes=/usr/include/oracle/12.1/client64 --enable-debug=ture
$ sudo make
编译通过后,执行
$ sudo make install
最后,直接运行/usr/local/software/tora-2.1.3/bin/tora即可。
相关推荐
Ubuntu 14.04 交叉编译环境的搭建,嵌入式开发环境的搭建。
ubuntU14.04下编译运行fast rcnn和各种问题解决
Ubuntu14.04离线安装NFS方法,这里面是需要的安装包,还有安装的手册,注意这个是Ubuntu14.04的安装包。
Ubuntu14.04交叉编译编译 ffmpeg3.4.1 脚本 属于 armv7-a 架构
Ubuntu14.04编译android4.4源码一次性成功
ubuntu14.04LTS离线安装openssh所需要的介质,亲测有效。
在ubuntu 14.04下有网安装GNU Radio
1.按以下顺序执行安装 sudo dpkg -i openssh-client_6.6p1-2ubuntu1_amd64.deb sudo dpkg -i openssh-sftp-server_6.6p1-2ubuntu1_amd64.deb sudo dpkg -i libck-connector0_0.4.5-3.1ubuntu2_amd64.deb sudo dpkg -...
Ubuntu 14.04下NFS安装配置,实际测试好用
在ubuntu 14.04上安装部署openstack kilo版本,用于想了解云计算方面的工程师等
ubuntu14.04安装gitlab.pdf
参照其他人的博客,绝对正确,在ubuntu14.04系统中安装indigo版本ROS的教程,亲手实践的!
Ubuntu 14.04系统下能用的vscode客户端(新版本在启动时无响应,且无法打开终端),版本号:code_1.42.1-1581432938_amd64.deb 使用方法:解压后执行sudo dpkg -i code*
完成bluez协议栈在ubuntu14.04上的编译,具体到依赖的库如何编译安装,一步一步实现,完全可行。
mysql-ubuntu14.04系统版
复制文件内百度网盘分享地址ubuntu-14.04-desktop-amd64.iso
虚拟机+Ubuntu 14.04完美安装方法。
Ubuntu14.04升级GCC4.9.3步骤,基于Linuxmint17、Ubuntu14.04亲测。
从mysql官网上下载mysql-server_5.7.21-1ubuntu14.04_amd64.deb-bundle.tar,然后进行离线安装,解压该安装包,会出现11个依赖包,按照顺序依次使用sudo dpkg -i 进行安装,中间会报错,显示缺少相应的依赖,具体...
Ubuntu14.04下indigo的手控器phantom omni驱动安装 参考github上前辈写的手控器的驱动 适合的平台:Ubuntu14.04 +indigo+phantom omni 里面还有相关的使用说明