Ubuntu10.10如何安装背单词软件Reciteword?

运维 系统运维
Ubuntu系统拥有强大的功能、实用的界面和完全免费的特点吸引了许多用户的使用,Ubuntu也相当注重系统的易用性,标准安装完成后,一开机就可以投入使用。Reciteword是一款中文界面的背单词软件(也称黑客背单词),功能比较强大。在Ubuntu中安装可能会遇到一些小困难,故在此说明一下。

Ubuntu系统拥有强大的功能、实用的界面和完全免费的特点吸引了许多用户的使用,Ubuntu也相当注重系统的易用性,标准安装完成后,一开机就可以投入使用,简单地说,就是安装完成以后,用户无需再费神安装浏览器、Office套装程序、多媒体播放程序等常用软件,一般也无需下载安装网卡、声卡等硬件设备的驱动。Reciteword是一款中文界面的背单词软件(也称黑客背单词),功能比较强大。在Ubuntu中安装可能会遇到一些小困难,故在此说明一下。

本文介绍的是从源码编译安装的过程。

Table of Contents

1 下载及安装(转载部分)

1.1 下载程序

  1.2 准备工具

1.3 黑客背单词的安装

2 遇到的编译错误

3 问题解决

1 下载及安装(转载部分)

1.1 下载程序

reciteword的网站是:http://reciteword.cosoft.org.cn/reciteword/index.html

作者提供了如下几个包,请按需下载源码包:

主程序源码(必须) reciteword

课本(重要) reciteword-books

词典(可选) reciteword-dicts

皮肤(可选) reciteword-skins-rw

真人发音 WyabdcRealPeopleTTS (可选,是stardict的真人语音)

1.2 准备工具

先安装编译需要的包

 

  1. apt-get install libesd0-dev pkg-config libgtk2.0-dev esound 

 

如果是Ubuntu 8.04版本,安装时可能会出现删除pulseaudio-esound-compat,ubuntu-desktop这两个文件,请之后再安装回去,如果不安装,进入桌面后桌面不成正常使用,我的方法是重启后按ctrl+alt+f1,进入控制台,打入以下命令:

sudo apt-get install Ubuntu-desktop就会安装这两个文件,www.linuxidc.com重启后正常 安装libesd0-alsa0,保证开启esd後,仍能用alsa。

apt-get install libesd-alsa0启用esd,这是reciteword播放声音所必须的:(假设是gnome环境)

在菜单中:系统->首选项->音效,在打开的窗口中:音效->允许软件混音(ESD)。

为了使设置生效,建议你最好重新启动系统。

 

1.3 黑客背单词的安装

 

安装过程就没有什么特别的了,进入存有reciteword的文件后:

 

  1. tar -xvfj reciteword-*.tar.bz2  
  2.  
  3. cd reciteword-0.*  
  4.  
  5. ./configure –prefix=/usr  
  6.  
  7. make  
  8.  
  9. sudo make install 

 

2 遇到的编译错误

Ubuntu会出现这样编译出错:

 

  1. bookfile.cpp: In function ‘gchar* rw_book_get_value(const gchar*, gchar*, gint)’:  
  2.  
  3. bookfile.cpp:95: error: invalid conversion from ‘const char*’ to ‘gchar*’  
  4.  
  5. bookfile.cpp: In function ‘gint rw_book_get_file_info(gchar*, gchar**, gchar**, gchar**, gchar**, gchar**, gchar**)’:  
  6.  
  7. bookfile.cpp:140: warning: deprecated conversion from string constant to ‘gchar*’  
  8.  
  9. bookfile.cpp:153: warning: deprecated conversion from string constant to ‘gchar*’  
  10.  
  11. bookfile.cpp:154: warning: deprecated conversion from string constant to ‘gchar*’  
  12.  
  13. bookfile.cpp:155: warning: deprecated conversion from string constant to ‘gchar*’  
  14.  
  15. bookfile.cpp:156: warning: deprecated conversion from string constant to ‘gchar*’  
  16.  
  17. bookfile.cpp:157: warning: deprecated conversion from string constant to ‘gchar*’  
  18.  
  19. bookfile.cpp: In function ‘BookFile* rw_book_open_file(gchar*)’:  
  20.  
  21. bookfile.cpp:228: warning: deprecated conversion from string constant to ‘gchar*’  
  22.  
  23. bookfile.cpp:229: warning: deprecated conversion from string constant to ‘gchar*’  
  24.  
  25. bookfile.cpp:230: warning: deprecated conversion from string constant to ‘gchar*’  
  26.  
  27. bookfile.cpp:231: warning: deprecated conversion from string constant to ‘gchar*’  
  28.  
  29. bookfile.cpp:232: warning: deprecated conversion from string constant to ‘gchar*’  
  30.  
  31. bookfile.cpp:233: warning: deprecated conversion from string constant to ‘gchar*’  
  32.  
  33. bookfile.cpp:209: warning: ignoring return value of ‘size_t fread(void*, size_t, size_t, FILE*)’, declared with attribute warn_unused_result 

 

make[3]: *** [bookfile.o] 错误 1

make[3]:正在离开目录 `/tmp/word/reciteword-0.8.4/src'

make[2]: *** [all-recursive] 错误 1

make[2]:正在离开目录 `/tmp/word/reciteword-0.8.4/src'

make[1]: *** [all-recursive] 错误 1

make[1]:正在离开目录 `/tmp/word/reciteword-0.8.4'

make: *** [all] 错误 2

3 问题解决

 

  1. bookfile.cpp:95: error: invalid conversion from ‘const char*’ to ‘gchar* 

 

根据以上错误找到 bookfile.cpp 在头文件处加上两句代码

#include "bookfile.h" #include #include #include #include #include const gchar* str1; const gchar* str2 = strchr(str1, 'a');再找到函数 (大概在90行里) static gchar * rw_book_get_value (const gchar * str1, gchar * str2,gint utf8) -----------------------------------------------------把原来的 tmp1 = strstr (str1, str2);改为 tmp1 = (gchar*)strstr (str1, str2);

经过上面的改动 再编译即可

相同问题请参考 http://gcc.gnu.org/gcc-4.4/porting_to.html

访问: http://ljp.9t9t.info

 

  1. Author: Li Junpeng  
  2.  
  3. Date: 2010-10-30 23:34:45 CST  
  4.  
  5. HTML generated by org-mode 6.21b in emacs 23 

总结:

希望本文介绍的Ubuntu10.10安装背单词软件Reciteword的方法能够对读者有所帮助,更多有关linux系统的知识还有待于读者去探索和学习。

【编辑推荐】

  1. Ubuntu10.10下3D特效的配置
  2. Ubuntu中如何自定义菜单快捷键?
  3. Ubuntu10.10通过USB蓝牙上网实例
  4. Ubuntu文件管理器Nautilus插件介绍
  5. Ubuntu上改变sudo默认timeout时间的方法
责任编辑:韩亚珊 来源: 之秀网
相关推荐

2011-09-01 13:35:50

Ubuntu中文man

2011-08-29 11:16:27

Ubuntu

2011-09-02 17:12:42

UbuntuGNOME 3

2011-03-11 12:57:36

UBUNTU10.10安装LAMP

2011-09-02 16:23:19

wubiUbuntu

2011-08-29 17:58:19

Ubuntu

2011-09-02 16:38:26

UbuntuNTFS

2011-08-30 15:53:07

Ubuntussh

2011-09-05 18:11:39

Ubuntu

2011-09-06 14:33:16

Ubuntug77

2011-09-01 16:00:59

Ubuntu

2011-09-06 17:20:44

Ubuntu关闭按钮

2011-01-19 10:03:24

Ubuntu

2011-08-29 15:52:12

2011-09-19 10:25:59

VimUbuntu

2010-11-18 09:40:08

2011-09-07 14:01:34

ubuntuPHP

2011-08-29 14:53:16

UbuntuMySQLserver

2011-07-05 10:55:14

Linux Qt 移植

2011-07-05 11:10:23

Linux Qt 移植
点赞
收藏

51CTO技术栈公众号