红联Linux门户
Linux帮助

在FC8上安装Tora遇到的问题及解决过程

发布时间:2008-02-29 11:12:18来源:红联作者:Interactive
用sql developer总是用的不习惯,于是又在网上搜了一下,听说Tora是Toad在linux下的替代品,于是下载下来试试。


1、下载Tora
http://jaist.dl.sourceforge.net/sourceforge/tora/tora-1.3.22.tar.gz
2、编译


解压后就是configure


[oracle@Lzglass tora-1.3.22]$./configure


在configure的时候遇到下面的问题


checking oci works... configure: error: Couldn't compile and run a simpile OCI app.
Try setting ORACLE_HOME or check config.log.
Otherwise, make sure ORACLE_HOME/lib is in /etc/ld.so.conf or LD_LIBRARY_PATH


用echo查看了一下ORACLE_HOME是没错的,而LD_LIBRARY_PATH却是空的,查看了一下.bash_profile里的LD_LIBRARY_PATH该环境变量是设置过的。但却没有生效。于是只好临时设置该变量


[oracle@Lzglass tora-1.3.22]$echo $ORACLE_HOME


[oracle@Lzglass tora-1.3.22]$export LD_LIBRARY_PATH=$ORACLE_HOME/lib


再次configure,上面的问题已经解决,却又出现如下错误:


checking oci works... yes
checking for qscintilla... configure: error: Couldn't compile a simple QScintilla application. See config.log or specify its location with --with-qscintilla-includes


在网上找了一下资料,说是需要安装Qscintilla。用yum查了一下,发现yum源上有,直接yum就可以了,否则又需要下载,安装了。
[oracle@Lzglass tora-1.3.22]$ yum list qscintilla
Available Packages
qscintilla.i386 1.7.1-3.fc8 fedora
[root@Lzglass tora-1.3.22]# yum install qscintilla


可是装好后不知道它放在哪个目录,只好用如下命令搜索它的位置
[oracle@Lzglass tora-1.3.22]$ find /usr -name *qscintilla*
/usr/share/doc/qscintilla-1.7.1
find: /usr/lib/audit: 权限不够
/usr/lib/qt-3.3/translations/qscintilla_de.qm
/usr/lib/qt-3.3/translations/qscintilla_fr.qm
/usr/lib/qt-3.3/translations/qscintilla_ru.qm
/usr/lib/qt-3.3/translations/qscintilla_pt_br.qm
/usr/lib/qt-3.3/lib/libqscintilla.so.7
/usr/lib/qt-3.3/lib/libqscintilla.so.7.0
/usr/lib/qt-3.3/lib/libqscintilla.so.7.0.1
find: /usr/libexec/utempter: 权限不够才知道原来它叫qt-3.3


再次configure却还是报先前的错误


于是再查了一下安装源,把下面两个都安装了
[root@Lzglass ~]# yum install qscintilla*
fedora 100% |=========================| 2.1 kB 00:00
livna 100% |=========================| 2.1 kB 00:00
updates 100% |=========================| 2.3 kB 00:00
Setting up Install Process
Parsing package install arguments
Package qscintilla - 1.7.1-3.fc8.i386 is already installed.
Resolving Dependencies
--> Running transaction check
---> Package qscintilla-devel.i386 0:1.7.1-3.fc8 set to be updated
---> Package qscintilla-designer.i386 0:1.7.1-3.fc8 set to be updated
--> Finished Dependency Resolution

Dependencies Resolved

=============================================================================
Package Arch Version Repository Size
=============================================================================
Installing:
qscintilla-designer i386 1.7.1-3.fc8 fedora 10 k
qscintilla-devel i386 1.7.1-3.fc8 fedora 549 k

Transaction Summary
=============================================================================
Install 2 Package(s)
Update 0 Package(s)
Remove 0 Package(s)

Total download size: 559 k
Is this ok [y/N]: y
Downloading Packages:
(1/2): qscintilla-designe 100% |=========================| 10 kB 00:00
(2/2): qscintilla-devel-1 100% |=========================| 549 kB 00:14
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
Installing: qscintilla-devel ######################### [1/2]
Installing: qscintilla-designer ######################### [2/2]

Installed: qscintilla-designer.i386 0:1.7.1-3.fc8 qscintilla-devel.i386 0:1.7.1-3.fc8Complete!再次configure顺利通过


[oracle@Lzglass ~]$ ./configure --with-qscintilla-includes=/usr/lib/qt-3.3/include


后面就是make 和make install了


=========================================================


继续昨天的,安装好后,


运行tora出现如下错误,而且进入之后不能切换到中文输入法


[oracle@Lzglass bin]$ ./tora
QApplication::palette: This function can only be called after the QApplication object has been created于是在下面网站下载了tora-1.3.21
http://www.linuxfans.org/nuke/modules.php?name=Site_Downloads&op=geninfo&did=4700用该网站的再次解压编译安装,却报如下错误:
tothread.cpp: In member function ‘void toThread::start()’:
tothread.cpp:190: 错误:‘toThreadStartWrapper’ 在此作用域中尚未声明
tothread.cpp: In member function ‘void toThread::startAsync()’:
tothread.cpp:199: 错误:‘toThreadStartWrapper’ 在此作用域中尚未声明
make[1]: *** [tora-tothread.o] 错误 1
make[1]: Leaving directory `/home/oracle/tora-1.3.21.m1'
make: *** [all] 错误 2
[oracle@Lzglass tora-1.3.21.m1]$ 在网上搜了一下(http://www.linuxsir.org/bbs/printthread.php?t=262634),说需要:找到文件tothread.cpp,编辑里边的内容,找到
#define THREAD_ASSERT(x) if((x)!=0) {
throw (qApp->translate("toThread","Thread function "%1" failed.").arg(QString::fromLatin1( #x ))); }

void toThread::initAttr()
{
//create the thread detached, so everything is cleaned up
//after it's finished.修改成如下:
#define THREAD_ASSERT(x) if((x)!=0) {
throw (qApp->translate("toThread","Thread function "%1" failed.").arg(QString::fromLatin1( #x ))); }

void *toThreadStartWrapper(void *t); //增加的代码

void toThread::initAttr()
{
//create the thread detached, so everything is cleaned up
//after it's finished.找到后,再次执行,虽然还是报QApplication::palette: This function can only be called after the QApplication object has been created但是已经可以在里面输入中文了。


====================================================


总结:


1、 从下面网站下载tora-1.3.21, http://www.linuxfans.org/nuke/modules.php?name=Site_Downloads&op=geninfo&did=4700


2、可能需要yum install qscintilla*


3、到解压压缩包到,然后切换到解压目录下./configure


4、make


5、找到文件tothread.cpp,编辑里边的内容,找到
#define THREAD_ASSERT(x) if((x)!=0) {
throw (qApp->translate("toThread","Thread function "%1" failed.").arg(QString::fromLatin1( #x ))); }

void toThread::initAttr()
{
//create the thread detached, so everything is cleaned up
//after it's finished.修改成如下:
#define THREAD_ASSERT(x) if((x)!=0) {
throw (qApp->translate("toThread","Thread function "%1" failed.").arg(QString::fromLatin1( #x ))); }

void *toThreadStartWrapper(void *t); //增加的代码
void toThread::initAttr()
{
//create the thread detached, so everything is cleaned up
//after it's finished.


6、切换到root,然后make install


7、完成后,就可以到/usr/local/tora/bin目录下,执行tora了
文章评论

共有 2 条评论

  1. chao.t 于 2008-02-29 17:14:57发表:

    下载一个.rpm的包了事

  2. gxf 于 2008-02-29 15:41:44发表:

    谢谢分享,支持原创……