CentOS 安装 Google Earth 方法


话说三年级的儿子非常喜欢用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 xz

3. Extract in a temporary directory (for example /temp) with: tar -xvf qt-r1008952-i486-1.txz --use-compress-program xz

4. 重命名原来的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 下却非常慢,输入一个字母都要等一会儿。

相关内容