> CentOS > CentOS教程 >

centos6.5安装fcitx4.0.0

先去http://download.fcitx-im.org/fcitx/ 下载。

注:我没有下载最新版本的原因是我cmake版本太低.有些库不好配置  下载all版本是google不能联网,需要的table.tar.gz和pinyin.tar.gz无法下载(当时我不知道,不过还好我firefox能够翻墙,用网页将tar.gz下载以后放入/data/table和/data下面)

1.先删除ibus,这个好办

# yum remove ibus

2.安装intltool,这个我看网友是下载后安装,有好多依赖,我是直接yum安装的,可以

# yum install intltool

3.在后面编译的时候缺少一个libtoolize

# yum install libtool

4.准备工作都做好了,现在下载,在这里:http://download.fcitx-im.org/fcitx/,我下载的其中的“fcitx-4.0.0.tar.gz”,下载后解压,进入目录先生成“.configure”

# ./autogen.sh

5.生成以后呢,就可以编译了

# ./configure

6.make 和 make install

# make  缺少Xrender就安装Oct 26 19:36:18 Installed: libXrender-devel-0.9.7-2.el6.i686   可以查看我下面的yum log文件
# make install

 

配置Fcitx为默认输入法
1. 新建配置文件 vim /etc/X11/xinit/xinput.d/fcitx.conf ,内容为:
XIM=fcitx
XIM_PROGRAM=/usr/local/bin/fcitx #确保此文件存在
XIM_ARGS=”-D”# 此处为大写D

SHORT_DESC="Fcitx"
GTK_IM_MODULE=xim
QT_IM_MODULE =xim

2. 然后在/etc/alternatives/目录下,将符号链接xinputrc删除,重新建一个:

mv /etc/alternatives/xinputrc /etc/alternatives/xinputrc.bak
rm –rf /etc/alternatives/xinputrc
ln -s /etc/X11/xinit/xinput.d/fcitx.conf /etc/alternatives/xinputrc

注:如果你使用的桌面是英文环境的,还需要在使用用户的用户目录.bashrc配置文件里添加如下内容:
export LANG=”zh_CN.UTF-8″
export LC_CTYPE=”zh_CN.UTF-8″
export XIM=fcitx
export XIM_PROGRAM=fcitx
export GTK_IM_MODULE=xim
export XMODIFIERS=”@im=fcitx”

在系统,首选项输入法中将fcitx设置为默认输入法,注销重新登录

注意:如果你的输入法安装了,但是又不能按ctrl+space杂办,是因为你还缺少啦一个库文件
yum install gtk2-immodule-xim

这是我的yum.log文件(/var/log/yum.log下面):

Oct 26 19:26:00 Erased: ibus-table-cangjie

Oct 26 19:26:02 Erased: ibus-chewing
Oct 26 19:26:03 Erased: ibus-table-erbi
Oct 26 19:26:03 Erased: ibus-anthy
Oct 26 19:26:04 Erased: ibus-hangul
Oct 26 19:26:05 Erased: ibus-table-additional
Oct 26 19:26:06 Erased: ibus-sayura
Oct 26 19:26:06 Erased: ibus-qt
Oct 26 19:26:07 Erased: ibus-table-wubi
Oct 26 19:26:08 Erased: ibus-table
Oct 26 19:26:09 Erased: ibus-pinyin
Oct 26 19:26:10 Erased: ibus-rawcode
Oct 26 19:26:11 Erased: ibus-m17n
Oct 26 19:26:11 Erased: ibus-gtk
Oct 26 19:26:12 Erased: ibus
Oct 26 19:27:40 Installed: perl-URI-1.40-2.el6.noarch
Oct 26 19:27:41 Installed: perl-IO-Compress-Base-2.021-136.el6.i686
Oct 26 19:27:41 Installed: 1:perl-Compress-Raw-Zlib-2.021-136.el6.i686
Oct 26 19:27:44 Installed: perl-IO-Compress-Zlib-2.021-136.el6.i686
Oct 26 19:27:45 Installed: perl-Compress-Zlib-2.021-136.el6.i686
Oct 26 19:27:45 Installed: perl-HTML-Tagset-3.20-4.el6.noarch
Oct 26 19:27:46 Installed: perl-HTML-Parser-3.64-2.el6.i686
Oct 26 19:27:48 Installed: perl-libwww-perl-5.833-2.el6.noarch
Oct 26 19:27:49 Installed: perl-XML-Parser-2.36-7.el6.i686
Oct 26 19:27:50 Installed: gettext-libs-0.17-16.el6.i686
Oct 26 19:27:54 Installed: libgcj-4.4.7-4.el6.i686
Oct 26 19:27:55 Installed: gettext-devel-0.17-16.el6.i686
Oct 26 19:27:56 Installed: intltool-0.41.0-1.1.el6.noarch
Oct 26 19:36:18 Installed: libXrender-devel-0.9.7-2.el6.i686
Oct 26 19:37:49 Installed: freetype-devel-2.3.11-14.el6_3.1.i686
Oct 26 19:37:50 Installed: fontconfig-devel-2.8.0-3.el6.i686
Oct 26 19:37:51 Installed: 2:libpng-devel-1.2.49-1.el6_2.i686
Oct 26 19:37:52 Installed: pixman-devel-0.26.2-5.1.el6_5.i686
Oct 26 19:37:53 Installed: cairo-devel-1.8.8-3.1.el6.i686
Oct 26 19:39:21 Installed: libXft-devel-2.3.1-2.el6.i686
Oct 26 19:39:22 Installed: glib2-devel-2.26.1-7.el6_5.i686
Oct 26 19:39:24 Installed: pango-devel-1.28.1-7.el6_3.i686

引用:

http://www.ienter.org/html/2013/07/119.html

http://www.07net01.com/linux/centOS6_4_anzhuang_fcitx4_0_151181_1365399650.html

(责任编辑:IT)