原创内容,转载请注明出处: https://www.myzhenai.com.cn/post/1925.html https://www.myzhenai.com/thread-16360-1-1.html
kchmviewer官方下载地址: https://sourceforge.net/projects/kchmviewer/files/kchmviewer/
kchmviewer依赖QT,所以在安装之前您必须先要安装QT,请参考官方安装包里的README文档.
3. INSTALLATION Usually kchmviewer is distributed in source code archive, so you need to compile it first. It requires Qt version 4.4 or higher. Note that you need to install qt4-devel and qt4-tools packages (the last one might be included in qt4-devel in your distribution), not just qt package. Also make sure you have chmlib-devel (some distros have it as libchm-devel) package installed. KDE build will check for its presence, but qmake does not have necessary functionality to do so. If you are getting errors regarding missing chm_lib.h file this means chmlib-devel is not installed. 3.1. Qt-only version To compile Qt-only version of kchmviewer, follow the procedure: > tar zxf kchmviewer-.tar.gz > cd kchmviewer- > qmake > make The compiled binary is in bin/kchmviewer. You could copy it somewhere, or use it as-is. It does not require installation. If QtWebKit module is not found, you will get the following error: > kchmviewwindow_qtwebkit.h:25:21: error: QWebView: No such file or directory Either install QtWebKit module, or remove "webkit" from QT+= line in src/src.pro 3.2 KDE4 version To compile the version of kchmviewer with KDE4 support, follow the procedure: > tar zxf kchmviewer- .tar.gz > mkdir build > cd build > cmake .. > make > sudo make install For KDE version the installation is required, since the KHTML KIO slave cannot be used in place.
安装方法如下:
# yum install libzip* chmlib -y
# wget https://softlayer-sng.dl.sourceforge.net/project/kchmviewer/kchmviewer/7.1/kchmviewer-7.1-1.i586.rpm
# rpm -ivh kchmviewer-7.1-1.i586.rpm
如果出现以下错误,请将您的libzip卸载再重新安装新版本.
error: Failed dependencies:
libzip.so.2 is needed by kchmviewer-7.1-1.i586
解决方法:
# yum remove libzip* -y
# wget ftp://ftp.muug.mb.ca/mirror/fedora/linux/development/rawhide/i386/os/Packages/l/libzip-0.11.2-3.fc22.i686.rpm
# rpm -ivh libzip-0.11.2-3.fc22.i686.rpm
# rpm -ivh kchmviewer-7.1-1.i586.rpm
如果您是升级kchmviewer-7.1的,升级前您必须要yum remove kchmviewer* -y 才能进行下一步操作.
Libzip:https://rpm.pbone.net/index.php3/stat/3/srodzaj/1/search/libzip.so.2
我前两天升级kchmviewer-7.1的时候就遇到一堆问题,因为我是使用Centos6.6的默认源进行安装的libzip,所以导致安装版本太低,解决方法很简单,yum remove libzip* -y 然后重新安装就可以了.我的安装日志如下.
[root@localhost RucLinux]# rpm -qa |grep qt qt-sqlite-4.6.2-28.el6_5.i686 qtlockedfile-2.4-3.el6.leigh123linux.i686 qt3-devel-3.3.8b-30.el6.i686 qt47-4.7.2-1_18.el6.i686 qt47-devel-4.7.2-1_18.el6.i686 poppler-qt4-devel-0.12.4-3.el6_0.1.i686 qt47-x11-4.7.2-1_18.el6.i686 qt47-webkit-4.7.2-1_18.el6.i686 qt-4.6.2-28.el6_5.i686 libqtxdg-devel-0.5.2-13.el6.i686 dbus-qt-0.70-7.2.el6.i686 dbus-qt-devel-0.70-7.2.el6.i686 poppler-qt4-0.12.4-3.el6_0.1.i686 qtsingleapplication-2.6.1-5.el6.leigh123linux.i686 libqtxdg-0.5.2-13.el6.i686 qt47-designer-plugin-phonon-4.7.2-1_18.el6.i686 poppler-qt-devel-0.12.4-3.el6_0.1.i686 qt47-webkit-devel-4.7.2-1_18.el6.i686 poppler-qt-0.12.4-3.el6_0.1.i686 qt3-3.3.8b-30.el6.i686 zlibrary-ui-qt-0.12.10-5.el6.i686 [root@localhost RucLinux]# rpm -qa |grep libzip libzip-0.9-3.1.el6.i686 libzip-devel-0.9-3.1.el6.i686 [root@localhost RucLinux]# rpm -qa |grep chmlib chmlib-0.40-3.el6.i686 chmlib-devel-0.40-3.el6.i686 [root@localhost RucLinux]# ln -s /usr/bin/qmake-qt47 /etc/alternatives/qmake [root@localhost RucLinux]# ls -l /etc/alternatives/qmake lrwxrwxrwx. 1 root root 19 11月 10 03:06 /etc/alternatives/qmake -> /usr/bin/qmake-qt47 [root@localhost RucLinux]# wget https://softlayer-sng.dl.sourceforge.net/project/kchmviewer/kchmviewer/7.1/kchmviewer-7.1.tar.gz [root@localhost RucLinux]# tar zxf kchmviewer-7.1.tar.gz [root@localhost RucLinux]# cd kchmviewer-7.1 [root@localhost kchmviewer-7.1]# /usr/bin/qmake-qt47 [root@localhost kchmviewer-7.1]# make cd lib/ && /usr/bin/qmake-qt47 /home/RucLinux/kchmviewer-7.1/lib/lib.pro -o Makefile cd lib/ && make -f Makefile make[1]: Entering directory `/home/RucLinux/kchmviewer-7.1/lib' cd libebook/ && /usr/bin/qmake-qt47 /home/RucLinux/kchmviewer-7.1/lib/libebook/libebook.pro -o Makefile cd libebook/ && make -f Makefile make[2]: Entering directory `/home/RucLinux/kchmviewer-7.1/lib/libebook' g++ -c -pipe -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector --param=ssp-buffer-size=4 -m32 -march=i686 -mtune=atom -fasynchronous-unwind-tables -fPIC -D_REENTRANT -Wall -W -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/lib/qt47/mkspecs/linux-g++ -I. -I/usr/include/QtCore -I/usr/include/QtGui -I/usr/include -I../../src -I. -o ebook_chm.o ebook_chm.cpp g++ -c -pipe -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector --param=ssp-buffer-size=4 -m32 -march=i686 -mtune=atom -fasynchronous-unwind-tables -fPIC -D_REENTRANT -Wall -W -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/lib/qt47/mkspecs/linux-g++ -I. -I/usr/include/QtCore -I/usr/include/QtGui -I/usr/include -I../../src -I. -o ebook_epub.o ebook_epub.cpp ebook_epub.cpp: In member function ‘virtual bool EBook_EPUB::load(const QString&)’: ebook_epub.cpp:55: Error:‘zip_fdopen’In this role has not been declared in the domain ebook_epub.cpp: In member function ‘bool EBook_EPUB::getFileAsBinary(QByteArray&, const QString&) const’: ebook_epub.cpp:308: Error:‘struct zip_stat’Members are not called 'valid' in ebook_epub.cpp:308: Error:‘ZIP_STAT_SIZE’In this role has not been declared in the domain ebook_epub.cpp:308: Error:‘struct zip_stat’Members are not called 'valid' in ebook_epub.cpp:308: Error:‘ZIP_STAT_INDEX’In this role has not been declared in the domain make[2]: *** [ebook_epub.o] Error 1 make[2]: Leaving directory `/home/RucLinux/kchmviewer-7.1/lib/libebook' make[1]: *** [sub-libebook-make_default] Error 2 make[1]: Leaving directory `/home/RucLinux/kchmviewer-7.1/lib' make: *** [sub-lib-make_default] Error 2 [root@localhost RucLinux]# wget https://softlayer-sng.dl.sourceforge.net/project/kchmviewer/kchmviewer/7.1/kchmviewer-7.1-1.i586.rpm [root@localhost RucLinux]# rpm -ivh kchmviewer-7.1-1.i586.rpm error: Failed dependencies: libzip.so.2 is needed by kchmviewer-7.1-1.i586 [root@localhost RucLinux]#
sicnature ---------------------------------------------------------------------
I P 地 址: 3.149.255.50
区 域 位 置: 美国
系 统 信 息:
Original content, please indicate the source:
同福客栈论坛 | 蟒蛇科普 | 海南乡情论坛 | JiaYu Blog
sicnature ---------------------------------------------------------------------
没有评论