for programmers, it's often important to look at some Reference Help documentation, but in the face of some old documents, and in the absence of network conditions, how to let your Linux support CHM document reading, then see below!
Method One:
simple way, in your Install extensions (add-on) on Firefox Firefox, search for a chmreader, select Install, restart Firefox browser.
to see *.chm simply perform at the terminal :
Firefox *.chm &
Advantages: Easy to install, see Pure English documents without pressure;
Cons: Poor compatibility, part of a lot of Chinese is not supported, such as my C language function Reference manual . CHM can only be partially displayed in Chinese;
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/48/02/wKiom1QFVLLB2CyXAACgXPUkeRk020.jpg "title=" Image002.jpg "alt=" Wkiom1qfvllb2cyxaacgxpukerk020.jpg "/>
Only partial display of Chinese
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/48/02/wKiom1QFVQmSbP6KAABfwbXnuAI315.jpg "title=" Image004.jpg "alt=" Wkiom1qfvqmsbp6kaabfwbxnuai315.jpg "/>
method Two: Install Gnochm
First of all, my installation environment:
[[Email protected]]# lsb_release-a
Lsbversion:: core-4.0-amd64:core-4.0-noarch:graphics-4.0-amd64:graphics-4.0-noarch:printing-4.0-amd64: Printing-4.0-noarch
Distributorid:redhatenterpriseserver
description:red Hat Enterprise Linux Server Release 6.2 (Santiago)
release:6.2
Codename:santiago
Linuxversion 2.6.32-220.el6.x86_64 ([email protected]) (Gccversion 4.4.5 20110214 (Red Hat 4.4.5-6) (GCC)) #1 SMP Wed Nov 9 08:03:13 EST2011
Installing Gnochm
1. Download gnochm 's original code pack
wget http://ncu.dl.sourceforge.net/project/gnochm/gnochm/0.9.11/gnochm-0.9.11.tar.gz
Tar zcvf gnochm-0.9.11.tar.gz
CD gnochm-0.9.11
Read First Readme
Can be known, there are two ways to install,
We use the source to install
Need the following several
This version depends on the package
REQUIREMENTS
-Pychm (or Python-chm) (>= 0.8.4)
-Python (>= 2.2.1)
Also, Python musthave gettext and locale modules
-Pygtk2 (>= 1.99.12)
-Pygtk2-libglade (>= 1.99.12)
-Gnome-python2 (>= 1.99.11)
-GNOME-PYTHON2-GTKHTML2 (>= 1.99.11)
-Gnome-python2-gconf (>= 1.99.11)
-Gnome-python2-bonobo (>= 1.99.11)
2. Download pychm
Pychm-0.8.4.tar.gz
Http://nchc.dl.sourceforge.net/project/gnochm/pychm/0.8.4/pychm-0.8.4.tar.gz
other software packages can be found with Yum search .
Installation:
Yum install Python pygtk2pygtk2-libglade gnome-python2 gnome-python2-gtkhtml2 gnome-python2-gconf Gnome-python2-bonobo-y
Installing pychm-0.8.4.tar.gz
(the software is written in Python and Linux_c , as a smaller open source software, or more worth a look)
Tar zxvf pychm-0.8.4.tar.gz
CD pychm-0.8.4
Python setup.py Install
you will be prompted chm/swig_chm.c:681:21:error:chm_lib.h:no such file or directory , and so on many lines of error;
Read Readme
See To install Chmlib, and provide
Http://66.93.236.84/~jedwin/projects/chmlib(unfortunately the link has expired)
Google The following address is the RPM package
http://pkgs.repoforge.org/chmlib/
You can see the following two packages
chmlib-0.40-1.el6.rf.x86_64.rpm 11-nov-2010 07:30 49K RHEL6 and CentOS-6 x86 64bit
chmlib-devel-0.40-1.el6.rf.x86_64.rpm 11-nov-2010 07:30 12K RHEL6 and CentOS-6 x86 64bit
Installing Chmlib
Execute again
Python setup.py Install
There are still problems:
Chm/swig_chm.c:13:20:error: Python.h: No such file or directory
so think about the next ~ ~ found that the list of dependent packages given is definitely worse, so view Python finds a problem
not loaded . Python-devel
so install python-devel-2.6.6-29.el6.x86_64.rpm
Execute python setup.py install again
can see success information:Creating/usr/lib64/python2.6/site-packages/chm
to gnochm-0.9.11 again .
./configure
Make
Su-
Makeinstall
Finally, the execution gnochm can be installed successfully.
Gnochm. /.. /C Language function Reference manual . CHM
(you can see the Firefox installs the extension (add-on) the chmreader to the Chinese support to be better! )
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/48/04/wKioL1QFVSax6nK9AADQfc1c6OM627.jpg "title=" Image006.jpg "alt=" Wkiol1qfvsax6nk9aadqfc1c6om627.jpg "/>
PS: There may be some font problems, the other README is very clear
Chinesecharacters is not displayed properly!
Thereare issues is involved in the problem, but first, make sure
You rungnochm with the "-D" flag and has a look in ~/.gnochm/gnochm.log
To seethat at least one of the ' encoding ' or ' LCID ' in your Fileare
Correct. Some dodgy chms do not has proper encodings in them.
If theencoding is correct and then:
1) thecontents pane does not show the proper characters
-Try Installing the Cjkpython support Forchinese located in
Http://cjkpython.i18n.org.
2) thehtml window shows some rubbish!
Specific questions, look at the log!
This article is from the "M-tier" blog, so be sure to keep this source http://mengix.blog.51cto.com/7194660/1547830
Let your Linux support the reading of CHM documents