RHEL6.2手动封装rpm源码包安装星际译王

星际译王(StarDict)是利用GTK(GIMP TOOLKIT)开发的国际化的、跨平台的自由的桌面字典软件。自身并不包含字典,须自行下载配合使用。它可以运行于多种不同的平台,如 Linux、Windows、FreeBSD及Solaris等,并使用GPL授权。
 
在RHEL6.2 64位系统,通过源码包安装,编译时disable各种选项好不容易通过后,始终无法make成功,google后初步判断应该是gcc4.4的bug,打了补丁也无效。最后通过编译rpm源码包成功安装。
  • 下载地址:(包含rpm包和rpm源码包,不喜欢编译的可选择rpm binary安装包直接安装)
 
 
  1. [root@rhel6 ~]# rpm -ivh stardict-3.0.1-22.puias6.src.rpm    
  2. warning: stardict-3.0.1-22.puias6.src.rpm: Header V3 RSA/SHA256 Signature, key ID 41a40948: NOKEY   
  3.    1:stardict               warning: user mockbuild does not exist - using root   
  4. warning: group mockbuild does not exist - using root   
  5. warning: user mockbuild does not exist - using root   
  6. warning: group mockbuild does not exist - using root   
  7. warning: user mockbuild does not exist - using root   
  8. warning: group mockbuild does not exist - using root   
  9. warning: user mockbuild does not exist - using root   
  10. warning: group mockbuild does not exist - using root   
  11. warning: user mockbuild does not exist - using root   
  12. warning: group mockbuild does not exist - using root   
  13. warning: user mockbuild does not exist - using root   
  14. warning: group mockbuild does not exist - using root   
  15. warning: user mockbuild does not exist - using root   
  16. warning: group mockbuild does not exist - using root   
  17. ########################################### [100%]   
  18. warning: user mockbuild does not exist - using root   
  19. warning: group mockbuild does not exist - using root   
  20. warning: user mockbuild does not exist - using root   
  21. warning: group mockbuild does not exist - using root   
  22. [root@rhel6 ~]# cd rpmbuild/SPECS  
  23.  
  24. [root@rhel6 SPECS]# cat stardict.spec | grep -v "#" | grep Requires: 
  25. Requires: enchantespeakgucharmap >= 2.22.1, libbonobo >= 2.2.0, libgnome >= 2.2.0, libgnomeui >= 2.2.0, libsigc++20 >= 2.0.17 
  26. BuildRequires: autoconf, automake, libtool 
  27. BuildRequires: desktop-file-utils, enchant-devel, gettext,  intltool, libgnomeui-devel >= 2.2.0, libsigc++20-devel, libtool, perl-XML-Parser, scrollkeeper 
  28. BuildRequires: gucharmap-devel >= 2.22.1 
  29. //从stardict.spec文件可以发现编译过程需要以上的依赖包,所以必须先安装好依赖包再进行编译,其中的一些非系统自带的依赖包在以下地址下载: 
  30. http://down.51cto.com/data/766011 
  31. [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   
这时候在附件里面已经可以启动星际译王了。不过现在只能联网才能使用,以下开始添加字典:
字典可以在 http://abloz.com/huzheng/stardict-dic/zh_CN/这个网站上下载你想要的其他中英词库或者其他你想要的词库。下载解压后将其解压在 /usr/share/stardict/dic/下即可使用
[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

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值