/ 中存储网

Ubuntu iBus添加Google拼音输入法的方法及命令

2015-08-29 21:16:27 来源:中存储网

下载谷歌拼音输入法(http://code.google.com/p/libgooglepinyin/downloads/list)解压到指定位置。

root@www:~/桌面/ibus_google# cmake
程序“cmake”尚未安装。  您可以使用以下命令安装:
apt-get install cmake
root@www:~/桌面/ibus_google# apt-get install cmake
正在读取软件包列表... 完成
正在分析软件包的依赖关系树      
正在读取状态信息... 完成      
将会安装下列额外的软件包:
cmake-data emacsen-common libxmlrpc-core-c3-0
下列【新】软件包将被安装:
cmake cmake-data emacsen-common libxmlrpc-core-c3-0
升级了 0 个软件包,新安装了 4 个软件包,要卸载 0 个软件包,有 139 个软件包未被升级。
需要下载 5,075 kB 的软件包。
解压缩后会消耗掉 14.9 MB 的额外空间。
您希望继续执行吗?[Y/n]Y
获取:1 http://cn.archive.Ubuntu.com/ubuntu/ oneiric/main libxmlrpc-core-c3-0 i386 1.16.32-0ubuntu4 [115 kB]
获取:2 http://cn.archive.ubuntu.com/ubuntu/ oneiric/main emacsen-common all 1.4.19ubuntu2 [17.7 kB]
获取:3 http://cn.archive.ubuntu.com/ubuntu/ oneiric/main cmake-data all 2.8.5-1ubuntu1 [709 kB]
获取:4 http://cn.archive.ubuntu.com/ubuntu/ oneiric/main cmake i386 2.8.5-1ubuntu1 [4,234 kB]
下载 5,075 kB,耗时 1分 25秒 (59.4 kB/s)                                      
选中了曾被取消选择的软件包 libxmlrpc-core-c3-0。
(正在读取数据库 ... 系统当前共安装有 235285 个文件和目录。)
正在解压缩 libxmlrpc-core-c3-0 (从 .../libxmlrpc-core-c3-0_1.16.32-0ubuntu4_i386.deb) ...
选中了曾被取消选择的软件包 emacsen-common。
正在解压缩 emacsen-common (从 .../emacsen-common_1.4.19ubuntu2_all.deb) ...
选中了曾被取消选择的软件包 cmake-data。
正在解压缩 cmake-data (从 .../cmake-data_2.8.5-1ubuntu1_all.deb) ...
选中了曾被取消选择的软件包 cmake。
正在解压缩 cmake (从 .../cmake_2.8.5-1ubuntu1_i386.deb) ...
正在处理用于 man-db 的触发器...
正在设置 libxmlrpc-core-c3-0 (1.16.32-0ubuntu4) ...
正在设置 emacsen-common (1.4.19ubuntu2) ...
emacsen-common: Handling install of emacsen flavor emacs
正在设置 cmake-data (2.8.5-1ubuntu1) ...
emacsen-common: Handling install of emacsen flavor emacs
正在设置 cmake (2.8.5-1ubuntu1) ...
正在处理用于 libc-bin 的触发器...
ldconfig deferred processing now taking place

 
root@www:/home/coder/progam/ibus_google# cd libgooglepinyin-0.1.1
root@www:/home/coder/progam/ibus_google/libgooglepinyin-0.1.1# mkdir build; cd build
root@www:/home/coder/progam/ibus_google/libgooglepinyin-0.1.1/build# cmake .. -DCMAKE_INSTALL_PREFIX=/usr
-- The C compiler identification is GNU
-- The CXX compiler identification is GNU
-- Check for working C compiler: /usr/bin/gcc
-- Check for working C compiler: /usr/bin/gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Configuring done
-- Generating done
-- Build files have been written to: /home/coder/progam/ibus_google/libgooglepinyin-0.1.1/build
root@www:/home/coder/progam/ibus_google/libgooglepinyin-0.1.1/build# make
Scanning dependencies of target googlepinyin
[  5%] Building CXX object src/CMakeFiles/googlepinyin.dir/dictbuilder.cpp.o
[ 11%] Building CXX object src/CMakeFiles/googlepinyin.dir/dictlist.cpp.o
[ 16%] Building CXX object src/CMakeFiles/googlepinyin.dir/dicttrie.cpp.o
[ 22%] Building CXX object src/CMakeFiles/googlepinyin.dir/lpicache.cpp.o
[ 27%] Building CXX object src/CMakeFiles/googlepinyin.dir/matrixsearch.cpp.o
[ 33%] Building CXX object src/CMakeFiles/googlepinyin.dir/mystdlib.cpp.o
[ 38%] Building CXX object src/CMakeFiles/googlepinyin.dir/ngram.cpp.o
[ 44%] Building CXX object src/CMakeFiles/googlepinyin.dir/pinyinime.cpp.o
[ 50%] Building CXX object src/CMakeFiles/googlepinyin.dir/searchutility.cpp.o
[ 55%] Building CXX object src/CMakeFiles/googlepinyin.dir/spellingtable.cpp.o
[ 61%] Building CXX object src/CMakeFiles/googlepinyin.dir/spellingtrie.cpp.o
[ 66%] Building CXX object src/CMakeFiles/googlepinyin.dir/splparser.cpp.o
[ 72%] Building CXX object src/CMakeFiles/googlepinyin.dir/sync.cpp.o
[ 77%] Building CXX object src/CMakeFiles/googlepinyin.dir/userdict.cpp.o
[ 83%] Building CXX object src/CMakeFiles/googlepinyin.dir/utf16char.cpp.o
[ 88%] Building CXX object src/CMakeFiles/googlepinyin.dir/utf16reader.cpp.o
Linking CXX shared library libgooglepinyin.so
[ 88%] Built target googlepinyin
Scanning dependencies of target dictbuilder
[ 94%] Building CXX object tools/CMakeFiles/dictbuilder.dir/pinyinime_dictbuilder.cpp.o
Linking CXX executable dictbuilder
[ 94%] Built target dictbuilder
Scanning dependencies of target datafile
[ 94%] Generating dict_pinyin.dat
read successfully, lemma num: 65101
spelling tree construct successfully.

------------STAT INFO-------------
[root is layer -1]
.. max_sonbuf_len per layer(from layer 0):
   413, 259, 55, 6, 0, 0, 0, 0, -,
.. max_homobuf_len per layer:
   -, 312, 19, 2, 2, 0, 0, 0, 0,
.. total_son_num per layer:
   413, 26183, 13370, 6619, 0, 0, 0, 0, -,
.. total_node_hasson per layer:
   1, 397, 6901, 6269, 0, 0, 0, 0, 0,
.. total_sonbuf_num per layer:
   1, 397, 6901, 6269, 0, 0, 0, 0, -,
.. total_sonbuf_allnoson per layer:
   0, 31, 3862, 6269, 0, 0, 0, 0, -,
.. total_node_in_sonbuf_allnoson per layer:
   0, 243, 4707, 6619, 0, 0, 0, 0, -,
.. total_homo_num per layer:
   0, 17033, 34070, 7372, 6626, 0, 0, 0, 0,
.. son buf allocation number with only 1 son: 10732
.. son buf allocation number with more than 1 son: 2836
.. total lemma node number: 46586
Build dictionary successfully.
Save dictionary successfully.
[100%] Built target datafile
root@www:/home/coder/progam/ibus_google/libgooglepinyin-0.1.1/build# make install
[ 88%] Built target googlepinyin
[ 94%] Built target dictbuilder
[100%] Built target datafile
Install the project...
-- Install configuration: ""
-- Installing: /usr/lib/libgooglepinyin.so.0.1.0
-- Installing: /usr/lib/libgooglepinyin.so.0
-- Installing: /usr/lib/libgooglepinyin.so
-- Installing: /usr/include/googlepinyin/atomdictbase.h
-- Installing: /usr/include/googlepinyin/dictbuilder.h
-- Installing: /usr/include/googlepinyin/dictdef.h
-- Installing: /usr/include/googlepinyin/dictlist.h
-- Installing: /usr/include/googlepinyin/dicttrie.h
-- Installing: /usr/include/googlepinyin/lpicache.h
-- Installing: /usr/include/googlepinyin/matrixsearch.h
-- Installing: /usr/include/googlepinyin/mystdlib.h
-- Installing: /usr/include/googlepinyin/ngram.h
-- Installing: /usr/include/googlepinyin/pinyinime.h
-- Installing: /usr/include/googlepinyin/searchutility.h
-- Installing: /usr/include/googlepinyin/spellingtable.h
-- Installing: /usr/include/googlepinyin/spellingtrie.h
-- Installing: /usr/include/googlepinyin/splparser.h
-- Installing: /usr/include/googlepinyin/sync.h
-- Installing: /usr/include/googlepinyin/userdict.h
-- Installing: /usr/include/googlepinyin/utf16char.h
-- Installing: /usr/include/googlepinyin/utf16reader.h
-- Installing: /usr/share/googlepinyin/dict_pinyin.dat
-- Installing: /usr/lib/pkgconfig/googlepinyin.pc
root@www:/home/coder/progam/ibus_google/libgooglepinyin-0.1.1/build# cd ..
root@www:/home/coder/progam/ibus_google/libgooglepinyin-0.1.1# cd ..
root@www:/home/coder/progam/ibus_google# cd ibus-googlepinyin-0.1.1
root@www:/home/coder/progam/ibus_google/ibus-googlepinyin-0.1.1# mkdir build; cd build
root@www:/home/coder/progam/ibus_google/ibus-googlepinyin-0.1.1/build# cmake .. -DCMAKE_INSTALL_PREFIX=/usr
-- The C compiler identification is GNU
-- The CXX compiler identification is GNU
-- Check for working C compiler: /usr/bin/gcc
-- Check for working C compiler: /usr/bin/gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Configuring done
-- Generating done
-- Build files have been written to: /home/coder/progam/ibus_google/ibus-googlepinyin-0.1.1/build
root@www:/home/coder/progam/ibus_google/ibus-googlepinyin-0.1.1/build# make
root@www:/home/coder/progam/ibus_google/ibus-googlepinyin-0.1.1/build# make install
Install the project...
-- Install configuration: ""
-- Installing: /usr/share/ibus-googlepinyin/main.py
-- Installing: /usr/share/ibus-googlepinyin/engine.py
-- Installing: /usr/share/ibus-googlepinyin/factory.py
-- Installing: /usr/share/ibus-googlepinyin/libopencc.py
-- Installing: /usr/share/ibus-googlepinyin/googlepinyin.py
-- Installing: /usr/share/ibus/component/googlepinyin.xml
-- Installing: /usr/share/ibus-googlepinyin/icons
-- Installing: /usr/share/ibus-googlepinyin/icons/simp-chinese.svg
-- Installing: /usr/share/ibus-googlepinyin/icons/half-punct.svg
-- Installing: /usr/share/ibus-googlepinyin/icons/chinese.svg
-- Installing: /usr/share/ibus-googlepinyin/icons/ibus-pinyin.svg
-- Installing: /usr/share/ibus-googlepinyin/icons/ibus-googlepinyin.png
-- Installing: /usr/share/ibus-googlepinyin/icons/trad-chinese.svg
-- Installing: /usr/share/ibus-googlepinyin/icons/half-letter.svg
-- Installing: /usr/share/ibus-googlepinyin/icons/full-letter.svg
-- Installing: /usr/share/ibus-googlepinyin/icons/english.svg
-- Installing: /usr/share/ibus-googlepinyin/icons/full-punct.svg
root@www:/home/coder/progam/ibus_google/ibus-googlepinyin-0.1.1/build# pkill -f ibus-daemon ; ibus-daemon -d -x
root@www:/home/coder/progam/ibus_google/ibus-googlepinyin-0.1.1/build#