星际译王(StarDict)是利用GTK(GIMP TOOLKIT)开发的国际化的、跨平台的自由的桌面字典软件。自身并不包含字典,须自行下载配合使用。它可以运行于多种不同的平台,如 Linux、Windows、FreeBSD及Solaris等,并使用GPL授权。
在RHEL6.2 64位系统,通过源码包安装,编译时disable各种选项好不容易通过后,始终无法make成功,google后初步判断应该是gcc4.4的bug,打了补丁也无效。最后通过编译rpm源码包成功安装。
下载地址:(包含rpm包和rpm源码包,不喜欢编译的可选择rpm binary安装包直接安装)
[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
########################################### [100%]
[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文件可以发现编译过程需要以上的依赖包,所以必须先安装好依赖包再进行编译,其中的一些非系统自带的依赖包在以下地址下载:
<a href="http://down.51cto.com/data/766011" target="_blank">http://down.51cto.com/data/766011 </a>
[root@rhel6 SPECS]# rpm -ba stardict.spec
<a href="http://blog.51cto.com/attachment/201304/143815311.png" target="_blank"></a>
//若编译时出现以上错误,则通过导入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
<a href="http://blog.51cto.com/attachment/201304/143954260.png" target="_blank"></a>
本文转自Vnimos51CTO博客,原文链接:http://blog.51cto.com/vnimos/1186395,如需转载请自行联系原作者