歡迎您光臨本站 註冊首頁

在FC8上安裝Tora遇到的問題及解決過程

←手機掃碼閱讀     火星人 @ 2014-03-25 , reply:0

用sql developer總是用的不習慣,於是又在網上搜了一下,聽說Tora是Toad在linux下的替代品,於是下載下來試試。


1、下載Tora
http://jaist.dl.sourceforge.net/ ... /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/mo ... 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/mo ... 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了

[火星人 ] 在FC8上安裝Tora遇到的問題及解決過程已經有446次圍觀

http://coctec.com/docs/linux/show-post-167052.html