星際譯王(StarDict)是利用GTK(GIMP TOOLKIT)開發的國際化的、跨平臺的自由的桌面字典軟件。自身並不包含字典,須自行下載配合使用。它能夠運行於多種不一樣的平臺,如 Linux、Windows、FreeBSD及Solaris等,並使用GPL受權。
在RHEL6.2 64位系統,經過源碼包安裝,編譯時disable各類選項好不容易經過後,始終沒法make成功,google後初步判斷應該是gcc4.4的bug,打了補丁也無效。最後經過編譯rpm源碼包成功安裝。
- [root@rhel6 ~]# rpm -ivh stardict-3.0.1-22.puias6.src.rpm
- warning: stardict-3.0.1-22.puias6.src.rpm: Header V3 RSA/SHA256 Signature, key ID 41a40948: NOKEY
- 1:stardict warning: user mockbuild does not exist - using root
- warning: group mockbuild does not exist - using root
- warning: user mockbuild does not exist - using root
- warning: group mockbuild does not exist - using root
- warning: user mockbuild does not exist - using root
- warning: group mockbuild does not exist - using root
- warning: user mockbuild does not exist - using root
- warning: group mockbuild does not exist - using root
- warning: user mockbuild does not exist - using root
- warning: group mockbuild does not exist - using root
- warning: user mockbuild does not exist - using root
- warning: group mockbuild does not exist - using root
- warning: user mockbuild does not exist - using root
- warning: group mockbuild does not exist - using root
- ########################################### [100%]
- warning: user mockbuild does not exist - using root
- warning: group mockbuild does not exist - using root
- warning: user mockbuild does not exist - using root
- warning: group mockbuild does not exist - using root
- [root@rhel6 ~]# cd rpmbuild/SPECS
-
- [root@rhel6 SPECS]# cat stardict.spec | grep -v "#" | grep Requires:
- Requires: enchant, espeak, gucharmap >= 2.22.1, libbonobo >= 2.2.0, libgnome >= 2.2.0, libgnomeui >= 2.2.0, libsigc++20 >= 2.0.17
- BuildRequires: autoconf, automake, libtool
- BuildRequires: desktop-file-utils, enchant-devel, gettext, intltool, libgnomeui-devel >= 2.2.0, libsigc++20-devel, libtool, perl-XML-Parser, scrollkeeper
- BuildRequires: gucharmap-devel >= 2.22.1
- //從stardict.spec文件能夠發現編譯過程須要以上的依賴包,因此必須先安裝好依賴包再進行編譯,其中的一些非系統自帶的依賴包在如下地址下載:
- http://down.51cto.com/data/766011
- [root@rhel6 SPECS]# rpm -ba stardict.spec
![](http://static.javashuo.com/static/loading.gif)
- //若編譯時出現以上錯誤,則經過導入PGK_CONFIG的環境變量解決
- [root@rhel6 SPECS]# export PGK_CONFIG=/usr/bin/pkg-config
- [root@rhel6 SPECS]# rpm -ba stardict.spec
- [root@rhel6 SPECS]# cd ../RPMS/x86_64/
- [root@rhel6 x86_64]# ls
- stardict-3.0.1-22.el6.x86_64.rpm stardict-debuginfo-3.0.1-22.el6.x86_64.rpm
- [root@rhel6 x86_64]# rpm -ivh stardict-3.0.1-22.el6.x86_64.rpm
這時候在附件裏面已經能夠啓動星際譯王了。不過如今只能聯網才能使用,如下開始添加字典:
[root@rhel6 ~]# ls /usr/share/stardict/dic/
stardict-hanyuchengyucidian-2.4.2 stardict-kdic-computer-gb-2.4.2 stardict-ncce-ce-2.4.2
stardict-hycihai-2.4.2 stardict-langdao-ec-gb-2.4.2 stardict-ncce-ec-2.4.2
![](http://static.javashuo.com/static/loading.gif)