話說三年級的兒子非常喜歡用Google Earth, 還保存下許多載屏。但某一天,兒子用的Windows電腦被我強制裝上了CentOS,哈哈,要被逼學習Linux了。
我裝的是KDE桌面,電腦啟動到命令行,登錄後,用startx啟動KDE桌面,兒子發現桌面上已經沒有熟悉的GoogleEarth了。看老大的:
下載 Google Earth 5.1 for linux 保存到 /tmp目錄
開啟KDE, 運行命令 sh /tmp/GoogleEarth.bin
默認安裝到 /opt/google-earth/目錄
安裝好後不能啟動, 怎麼回事????
在Google.com中搜索,找到這個頁面:
http://www.google.com/support/forum/p/earth/thread?tid=0ab0ed80ed61cbfc&hl=en
其中有個網友wsanders問答說:
Running CentOS 5.2 and had this problem. The Fedora 10 libstc++ RPM from http://rpmfind.net//linux/RPM/fedora/10/i386/libstdc++-4.3.2-7.i386.html fixed this.
Do NOT install with RPM -u unless you are an expert! It will install the library in /usr/lib and this may cause problems for other applications. Instead:
1) Download the RPM to /tmp
2) mkdir /tmp/junk
3) cd /tmp/junk
4) rpm2cpio ../libstdc++-4.3.2-7.i386.rpm | cpio -idv
5) cp ./usr/lib/libstdc++.so.6 ./usr/lib/libstdc++.so.6.0.10 /opt/googleearth (or link .so.6)
立即照辦,GoogleEarth可以啟動了,哈哈,還不謝謝老大。
CentOS Google Earth 中文支持
現在CentOS中Google Earth是可以啟動了,可是在Fly To中不支持中文,如果CentOS語言選中文的慶,Google Earth的菜單全是亂碼,怎麼辦呢?
查找網絡,說是因為Google Earth自帶的Qt庫文件太舊的原因。於是到 /usr/lib/qt4/lib下找對應的庫文件,發現缺少QtWebKit.so.4庫文件。嘗試在KDE的添加刪除程序中安裝Qt4的開發文件和Qt SQLite模塊,都沒有解決問題。
後來在網上查到這篇文章,有人在回復中提供了一個相關Qt lib的下載地址:
http://www.google.com/support/forum/p/earth/thread?tid=1a689c3a5159edad&hl=en
Download qt-r1008952-i486-1.txz from ftp://ftp.slackware.at/slackware-13.0/slackware/l/
Extract in a temporary directory (for example /root/Temp) with: tar xvf qt-r1008952-i486-1.txz
Remove /opt/google-earth/libQt*.* and /opt/google-earth/plugins/
imageformats/*.*
Then:
cp /root/Temp/qt-r1008952/lib/ libQtCore.* /opt/google-earth
cp /root/Temp/qt-r1008952/lib/libQtGui.* /opt/google-earth
cp /root/Temp/qt-r1008952/lib/libQtNetwork.* /opt/google-earth
cp /root/Temp/qt-r1008952/lib/libQtWebKit.* /opt/google-earth
cp /root/Temp/qt-r1008952/plugins/imageformats/*.* /opt/google-earth/plugins/imageformats
Remove /opt/google-earth/qt.conf
Add export LC_NUMERIC=us_US.UTF-8 to /opt/google-earth/googleearth 於是參考上面說明,終於解決了Google Earth中文支持的問題:
1. Download qt-r1008952-i486-1.txz from ftp://ftp.slackware.at/
slackware-13.0/slackware/l/
我是把firefox的下載默認保存目錄設成/temp 點擊鏈接下載,然後自動保存到了/temp目錄
2. 安裝xz解壓工具
CentOS tar默認不能解壓txz格式,要先安裝xz工具:
yum install xz3. Extract in a temporary directory (for example /temp) with:
tar -xvf qt-r1008952-i486-1.txz --use-compress-program xz4. 重命名原來的Qt庫文件,這樣萬一操作有問題文件恢復
在命令行下操作:
cd /opt/google-earth
mv libQtCore.so.4 libQtCore.so.4.src
mv libQtGui.so.4 libQtGui.so.4.src
mv libQtNetwork.so.4 libQtNetwork.so.4.src
mv libQtWebKit.so.4 libQtWebKit.so.4.src 5. 復制剛才下載的Qt庫文件到google-earth目錄
cp /usr/lib/qt/lib/libQtCore.so.4.5.1 libQtCore.so.4
cp /usr/lib/qt/lib/libQtGui.so.4.5.1 libQtGui.so.4
cp /usr/lib/qt/lib/libQtNetwork.so.4.5.1 libQtNetwork.so.4
cp /usr/lib/qt/lib/libQtWebKit.so.4.5.1 libQtWebKit.so.4現在, Google Earth已經完美支持中文了。
可惜的是,同樣的一台電腦,在Windwos XP下Google Earth運行還比較快,在CentOS 下卻非常慢,輸入一個字母都要等一會兒。