linux下查看chm文件
查看chm文件的时候需要IE的内核,这在linux显然是无法实现的,而用软件将chm转换成网页文件后,不仅非常杂乱,而且经常找不到首页,很不方便,于是我们需要用到linux的一款非常好用的chm文件查看工具,--kchmviewer,下边简述它的安装
step1 到上下载kchmviewer的最新发布版本。
step2 tar zfxv kchmviewer-3.1-2.tar.gz解压文件到当前目录。
step3 切换到解压到的目录下,./configure
程序报错
checking for Qt... configure: error: Qt (>= Qt 3.3) (headers and libraries) not found. Please check your installation!
For more details about this problem, look at the end of config.log.
查找config.log里 有关qt的内容
[root@localhost kchmviewer-3.1]# cat config.log | grep qt
configure: 30631: /usr/lib/qt3/include/qstyle.h
configure: 30631: /usr/lib/qt3/qstyle.h
configure: 30631: /usr/lib/qt/include/qstyle.h
configure: 30631: /usr/lib/qt/qstyle.h
configure: 30631: /usr/share/qt3/include/qstyle.h
configure: 30631: /usr/share/qt3/qstyle.h
configure: 30631: /usr/local/qt/include/qstyle.h
configure: 30631: /usr/include/qt/qstyle.h
configure: 30631: /usr/X11R6/include/X11/qt/qstyle.h
configure: 30631: /usr/X11R6/include/qt/qstyle.h
configure: 30631: /usr/X11R6/include/qt2/qstyle.h
configure: 30631: /usr/include/qt3/qstyle.h
tried /usr/lib/qt3/lib
tried /usr/lib/qt3
tried /usr/lib/qt/lib
tried /usr/lib/qt
tried /usr/share/qt3/lib
tried /usr/share/qt3
tried /usr/local/qt/lib
configure:30749: rm -rf SunWS_cache; g++ -o conftest -Wnon-virtual-dtor -Wno-long-long -Wundef -ansi -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -Wcast-align -Wconversion -Wchar-subscripts -Wall -W -Wpointer-arith -Wwrite-strings -O2 -Wformat-security -Wmissing-format-attribute -fno-exceptions -fno-check-new -fno-common -INO -DQT_THREAD_SUPPORT -D_REENTRANT -LNONE conftest.cc -lqt-mt -lpng -lz -lm -ljpeg -ldl -lSM -lICE -lXext -lX11 -lSM -lICE -lpthread 1>&5
ac_cv_have_qt=have_qt=no
可以看到configure在寻找qt3里的headers and libraries ,但没有找到,到/usr/lib里一看才知道,原来是文件夹名字不一致,不是qt而是qt-3.3,于是给configure加上参数,指定目录,
./configure --prefix=/usr --with-qt-dir=/usr/lib/qt-3.3/ --with-qt-includes=/usr/lib/qt-3.3/include/ --with-qt-libraries=/usr/lib/qt-3.3/lib
重新configure成功
step4 make
step5 make install
至此,kchmviewer安装结束,在命令行下输入kchmviewer即可启动程序,选定chm文件后,即可打开,程序界面跟windows下的chm是一致的,非常方便。
阅读(3707) | 评论(0) | 转发(0) |