星际译王(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

- //若编译时出现以上错误,则经过导入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
