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 
  32. //若编译时出现以上错误,则通过导入PGK_CONFIG的环境变量解决 
  33. [root@rhel6 SPECS]# export PGK_CONFIG=/usr/bin/pkg-config  
  34. [root@rhel6 SPECS]# rpm -ba stardict.spec  
  35. [root@rhel6 SPECS]# cd ../RPMS/x86_64/  
  36. [root@rhel6 x86_64]# ls  
  37. stardict-3.0.1-22.el6.x86_64.rpm  stardict-debuginfo-3.0.1-22.el6.x86_64.rpm  
  38. [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

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章