全球主机交流论坛

 找回密码
 注册

QQ登录

只需一步,快速开始

IP归属甄别会员请立即修改密码
查看: 2211|回复: 8
打印 上一主题 下一主题

仍然是linux下的软件安装故障求教

[复制链接]
跳转到指定楼层
1#
发表于 2014-11-15 04:55:29 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
前边一个帖子解决了一半,但仍有问题需要请教大家,谢谢了. 前一个帖子 http://hostloc.gdisk.cf/thread-260057-1-1.html

现在的问题是我使用 rpm -ivh kchmviewer-7.1-1.i586.rpm 可以安装rpm -ivh kchmviewer-7.1 并且使用正常,但是我使用编译方式来安装却会出错,不知道问题出在哪里,所以麻烦大家帮我看看. 谢谢了. ebook_epub.cpp和Makefile文件下载:http://pan.baidu.com/s/1jGj5f0a

依赖包我已安装了

[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.11.2-3.fc22.i686

[root@localhost RucLinux]# rpm -qa |grep chmlib
chmlib-0.40-3.el6.i686
chmlib-devel-0.40-3.el6.i686

[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:23 的文件中:
ebook_epub.h:28:17: 错误:zip.h:没有那个文件或目录
ebook_epub.cpp: In member function ‘virtual bool EBook_EPUB::load(const QString&)’:
ebook_epub.cpp:55: 错误:‘zip_fdopen’在此作用域中尚未声明
ebook_epub.cpp: In member function ‘virtual void EBook_EPUB::close()’:
ebook_epub.cpp:74: 错误:‘zip_close’在此作用域中尚未声明
ebook_epub.cpp: In member function ‘bool EBook_EPUB::getFileAsBinary(QByteArray&, const QString&) const’:
ebook_epub.cpp:290: 错误:聚合‘zip_stat fileinfo’类型不完全,无法被定义
ebook_epub.cpp:301: 错误:invalid use of incomplete type ‘struct zip_stat’
ebook_epub.cpp:290: 错误:forward declaration of ‘struct zip_stat’
ebook_epub.cpp:308: 错误:‘ZIP_STAT_SIZE’在此作用域中尚未声明
ebook_epub.cpp:308: 错误:‘ZIP_STAT_INDEX’在此作用域中尚未声明
ebook_epub.cpp:312: 错误:‘zip_fopen_index’在此作用域中尚未声明
ebook_epub.cpp:321: 错误:‘zip_fread’在此作用域中尚未声明
ebook_epub.cpp:324: 错误:‘zip_fclose’在此作用域中尚未声明
ebook_epub.cpp:328: 错误:‘zip_fclose’在此作用域中尚未声明
make[2]: *** [ebook_epub.o] 错误 1
make[2]: Leaving directory `/home/RucLinux/kchmviewer-7.1/lib/libebook'
make[1]: *** [sub-libebook-make_default] 错误 2
make[1]: Leaving directory `/home/RucLinux/kchmviewer-7.1/lib'
make: *** [sub-lib-make_default] 错误 2

2#
 楼主| 发表于 2014-11-15 05:02:45 | 只看该作者
Honestly I have no idea what's wrong with this setup.
我给作者发了个邮件,但作者回复说并不知道为什么会发生这样的问题. 并不影响使用现在,但我就是想折腾明白问题,所以还请大家指教,谢谢了.
Screenshot.png (234.75 KB, 下载次数: 0)
3#
发表于 2014-11-15 18:14:14 来自手机 | 只看该作者
可能是路径问题。
很多函数没声明,表示.h文件没包含进去
真想自己编译,那就对着错误提示一条条看吧!
4#
发表于 2014-11-15 18:39:15 来自手机 | 只看该作者
表示咱用ubuntu,不编译,太脏
5#
发表于 2014-11-15 18:56:00 | 只看该作者
本帖最后由 SYN 于 2014-11-15 19:00 编辑

我猜测是libzip-devel这个包没安装,编译可能需要这个,如果要安装的话不能用EPEL源里的这个包
你得用你当前libzip版本对应的devel包
  1. ftp://fr2.rpmfind.net/linux/fedora/linux/development/rawhide/i386/os/Packages/l/libzip-devel-0.11.2-3.fc22.i686.rpm
复制代码
  把这个装上再编译试试,另外极有可能是libebook包这个太旧,导致..
6#
发表于 2014-11-15 19:28:25 | 只看该作者
yum install zlib-devel
7#
 楼主| 发表于 2014-11-16 01:34:06 | 只看该作者
本帖最后由 Ruclinux 于 2014-11-16 01:36 编辑
SYN 发表于 2014-11-15 18:56
我猜测是libzip-devel这个包没安装,编译可能需要这个,如果要安装的话不能用EPEL源里的这个包
你得用你当 ...


谢谢,

[root@localhost RucLinux]# rpm -ivh libzip-devel-0.11.2-3.fc22.i686.rpm
warning: libzip-devel-0.11.2-3.fc22.i686.rpm: Header V3 RSA/SHA256 Signature, key ID 8e1431d5: NOKEY
Preparing...                ########################################### [100%]
   1:libzip-devel           ########################################### [100%]
[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
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.o ebook.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_chm_encoding.o ebook_chm_encoding.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_search.o ebook_search.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 helper_entitydecoder.o helper_entitydecoder.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 helper_search_index.o helper_search_index.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 helperxmlhandler_epubcontainer.o helperxmlhandler_epubcontainer.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 helperxmlhandler_epubcontent.o helperxmlhandler_epubcontent.cpp
In file included from helperxmlhandler_epubcontent.cpp:20:
helperxmlhandler_epubcontent.h:30: 错误:字段‘metadata’类型不完全
helperxmlhandler_epubcontent.h:33: 错误:字段‘manifest’类型不完全
helperxmlhandler_epubcontent.cpp: In member function ‘virtual bool HelperXmlHandler_EpubContent::startElement(const QString&, const QString&, const QString&, const QXmlAttributes&)’:
helperxmlhandler_epubcontent.cpp:47: 错误:‘manifest’在此作用域中尚未声明
helperxmlhandler_epubcontent.cpp: In member function ‘virtual bool HelperXmlHandler_EpubContent::characters(const QString&)’:
helperxmlhandler_epubcontent.cpp:73: 错误:‘metadata’在此作用域中尚未声明
make[2]: *** [helperxmlhandler_epubcontent.o] 错误 1
make[2]: Leaving directory `/home/RucLinux/kchmviewer-7.1/lib/libebook'
make[1]: *** [sub-libebook-make_default] 错误 2
make[1]: Leaving directory `/home/RucLinux/kchmviewer-7.1/lib'
make: *** [sub-lib-make_default] 错误 2

8#
 楼主| 发表于 2014-11-16 21:33:27 | 只看该作者
继续顶上,谢谢
9#
 楼主| 发表于 2014-11-17 11:46:50 | 只看该作者
接着顶上,谢谢
您需要登录后才可以回帖 登录 | 注册

本版积分规则

Archiver|手机版|小黑屋|全球主机交流论坛

GMT+8, 2025-11-5 13:54 , Processed in 0.342831 second(s), 14 queries , Gzip On, MemCache On.

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表