当前位置: 技术问答>linux和unix
安装qt4失败!
来源: 互联网 发布时间:2017-02-18
本文导语: 我下载的qt-x11-opensource-src-4.5.0.tar.gz,在ubuntu和redhat上安装的时候都出现这样的错误: In file included from ../../include/QtGui/private/qt_x11_p.h:1, from kernel/qapplication.cpp:76: ../../include/QtGui/private/../../../sr...
我下载的qt-x11-opensource-src-4.5.0.tar.gz,在ubuntu和redhat上安装的时候都出现这样的错误:
In file included from ../../include/QtGui/private/qt_x11_p.h:1,
from kernel/qapplication.cpp:76:
../../include/QtGui/private/../../../src/gui/kernel/qt_x11_p.h:69:22: error: X11/Xlib.h: 没有该文件或目录
../../include/QtGui/private/../../../src/gui/kernel/qt_x11_p.h:74:23: error: X11/Xutil.h: 没有该文件或目录
../../include/QtGui/private/../../../src/gui/kernel/qt_x11_p.h:75:21: error: X11/Xos.h: 没有该文件或目录
../../include/QtGui/private/../../../src/gui/kernel/qt_x11_p.h:82:23: error: X11/Xatom.h: 没有该文件或目录
In file included from ../../include/QtGui/private/qt_x11_p.h:1,
from kernel/qapplication.cpp:76:
../../include/QtGui/private/../../../src/gui/kernel/qt_x11_p.h:299: 错误: ‘Colormap’没有命名一个类型
../../include/QtGui/private/../../../src/gui/kernel/qt_x11_p.h:300: 错误: ISO C++ 不允许声明无类型的‘Visual’
../../include/QtGui/private/../../../src/gui/kernel/qt_x11_p.h:300: 错误: expected ‘;’ before ‘*’ token
../../include/QtGui/private/../../../src/gui/kernel/qt_x11_p.h:309: 错误: ‘Time’没有命名一个类型
../../include/QtGui/private/../../../src/gui/kernel/qt_x11_p.h:310: 错误: ‘Window’没有命名一个类型
../../include/QtGui/private/../../../src/gui/kernel/qt_x11_p.h:311: 错误: ‘Window’没有命名一个类型
../../include/QtGui/private/../../../src/gui/kernel/qt_x11_p.h:334: 错误: ‘Window’没有命名一个类型
../../include/QtGui/private/../../../src/gui/kernel/qt_x11_p.h:337: 错误: ‘Window’未声明
../../include/QtGui/private/../../../src/gui/kernel/qt_x11_p.h:338: 错误: ‘Window’未声明
../../include/QtGui/private/../../../src/gui/kernel/qt_x11_p.h:338: 错误: ‘Atom’未声明
../../include/QtGui/private/../../../src/gui/kernel/qt_x11_p.h:339: 错误: ‘Atom’未声明
../../include/QtGui/private/../../../src/gui/kernel/qt_x11_p.h:340: 错误: ‘Window’未声明
../../include/QtGui/private/../../../src/gui/kernel/qt_x11_p.h:340: 错误: ‘Atom’未声明
../../include/QtGui/private/../../../src/gui/kernel/qt_x11_p.h:351: 错误: expected ‘,’ or ‘...’ before ‘*’ token
../../include/QtGui/private/../../../src/gui/kernel/qt_x11_p.h:351: 错误: ISO C++ 不允许声明无类型的‘XSelectionRequestEvent’
../../include/QtGui/private/../../../src/gui/kernel/qt_x11_p.h:353: 错误: ‘Atom’未声明
../../include/QtGui/private/../../../src/gui/kernel/qt_x11_p.h:354: 错误: ‘Atom’没有命名一个类型
../../include/QtGui/private/../../../src/gui/kernel/qt_x11_p.h:356: 错误: ‘Atom’未声明
../../include/QtGui/private/../../../src/gui/kernel/qt_x11_p.h:357: 错误: ‘Atom’没有命名一个类型
../../include/QtGui/private/../../../src/gui/kernel/qt_x11_p.h:358: 错误: ‘Atom’未声明
../../include/QtGui/private/../../../src/gui/kernel/qt_x11_p.h:359: 错误: ‘Atom’未声明
../../include/QtGui/private/../../../src/gui/kernel/qt_x11_p.h:359: 错误: ‘Atom’未声明
../../include/QtGui/private/../../../src/gui/kernel/qt_x11_p.h:360: 错误: ‘Atom’在此作用域中尚未声明
../../include/QtGui/private/../../../src/gui/kernel/qt_x11_p.h:360: 错误: 模板参数 1 无效
../../include/QtGui/private/../../../src/gui/kernel/qt_x11_p.h:361: 错误: ‘Atom’未声明
../../include/QtGui/private/../../../src/gui/kernel/qt_x11_p.h:362: 错误: ‘Atom’没有命名一个类型
../../include/QtGui/private/../../../src/gui/kernel/qt_x11_p.h:437: 错误: ISO C++ 不允许声明无类型的‘Atom’
../../include/QtGui/private/../../../src/gui/kernel/qt_x11_p.h:437: 错误: expected ‘;’ before ‘*’ token
../../include/QtGui/private/../../../src/gui/kernel/qt_x11_p.h:439: 错误: ISO C++ 不允许声明无类型的‘Window’
../../include/QtGui/private/../../../src/gui/kernel/qt_x11_p.h:439: 错误: expected ‘;’ before ‘*’ token
../../include/QtGui/private/../../../src/gui/kernel/qt_x11_p.h:441: 错误: ‘Window’没有命名一个类型
../../include/QtGui/private/../../../src/gui/kernel/qt_x11_p.h:444: 错误: ISO C++ 不允许声明无类型的‘Visual’
../../include/QtGui/private/../../../src/gui/kernel/qt_x11_p.h:444: 错误: expected ‘;’ before ‘*’ token
../../include/QtGui/private/../../../src/gui/kernel/qt_x11_p.h:445: 错误: ISO C++ 不允许声明无类型的‘Colormap’
../../include/QtGui/private/../../../src/gui/kernel/qt_x11_p.h:445: 错误: expected ‘;’ before ‘*’ token
../../include/QtGui/private/../../../src/gui/kernel/qt_x11_p.h:449: 错误: ‘Time’没有命名一个类型
../../include/QtGui/private/../../../src/gui/kernel/qt_x11_p.h:450: 错误: ‘Time’没有命名一个类型
../../include/QtGui/private/../../../src/gui/kernel/qt_x11_p.h:476: 错误: ISO C++ 不允许声明无类型的‘Visual’
../../include/QtGui/private/../../../src/gui/kernel/qt_x11_p.h:476: 错误: expected ‘;’ before ‘*’ token
../../include/QtGui/private/../../../src/gui/kernel/qt_x11_p.h:477: 错误: ‘Colormap’没有命名一个类型
../../include/QtGui/private/../../../src/gui/kernel/qt_x11_p.h:660: 错误: ‘Atom’没有命名一个类型
../../include/QtGui/private/../../../src/gui/kernel/qt_x11_p.h:662: 错误: ‘Atom’未声明
../../include/QtGui/private/../../../src/gui/kernel/qt_x11_p.h:691: 错误: ‘FocusOut’在此作用域中尚未声明
../../include/QtGui/private/../../../src/gui/kernel/qt_x11_p.h:692: 错误: ‘FocusIn’在此作用域中尚未声明
../../include/QtGui/private/../../../src/gui/kernel/qt_x11_p.h:693: 错误: ‘KeyPress’在此作用域中尚未声明
../../include/QtGui/private/../../../src/gui/kernel/qt_x11_p.h:694: 错误: ‘KeyRelease’在此作用域中尚未声明
../../include/QtGui/private/../../../src/gui/kernel/qt_x11_p.h:695: 错误: ‘None’在此作用域中尚未声明
../../include/QtGui/private/../../../src/gui/kernel/qt_x11_p.h:696: 错误: ‘RevertToParent’在此作用域中尚未声明
../../include/QtGui/private/../../../src/gui/kernel/qt_x11_p.h:697: 错误: ‘GrayScale’在此作用域中尚未声明
../../include/QtGui/private/../../../src/gui/kernel/qt_x11_p.h:698: 错误: ‘CursorShape’在此作用域中尚未声明
../../include/QtGui/private/../../../src/gui/kernel/qt_x11_p.h:713: 错误: ‘XPoint’在此作用域中尚未声明
../../include/QtGui/private/../../../src/gui/kernel/qt_x11_p.h:713: 错误: 模板参数 1 无效
../../include/QtGui/private/../../../src/gui/kernel/qt_x11_p.h:714: 错误: ‘XRectangle’在此作用域中尚未声明
../../include/QtGui/private/../../../src/gui/kernel/qt_x11_p.h:714: 错误: 模板参数 1 无效
../../include/QtGui/private/../../../src/gui/kernel/qt_x11_p.h:715: 错误: ‘XChar2b’在此作用域中尚未声明
../../include/QtGui/private/../../../src/gui/kernel/qt_x11_p.h:715: 错误: 模板参数 1 无效
make[1]: *** [.obj/release-shared/qapplication.o] 错误 1
make[1]:正在离开目录 `/tmp/qt-x11-opensource-src-4.5.0/src/gui'
make: *** [sub-gui-install_subtargets-ordered] 错误 2
这是什么问题,如何解决啊?还请大家多多帮忙,不胜感激!
In file included from ../../include/QtGui/private/qt_x11_p.h:1,
from kernel/qapplication.cpp:76:
../../include/QtGui/private/../../../src/gui/kernel/qt_x11_p.h:69:22: error: X11/Xlib.h: 没有该文件或目录
../../include/QtGui/private/../../../src/gui/kernel/qt_x11_p.h:74:23: error: X11/Xutil.h: 没有该文件或目录
../../include/QtGui/private/../../../src/gui/kernel/qt_x11_p.h:75:21: error: X11/Xos.h: 没有该文件或目录
../../include/QtGui/private/../../../src/gui/kernel/qt_x11_p.h:82:23: error: X11/Xatom.h: 没有该文件或目录
In file included from ../../include/QtGui/private/qt_x11_p.h:1,
from kernel/qapplication.cpp:76:
../../include/QtGui/private/../../../src/gui/kernel/qt_x11_p.h:299: 错误: ‘Colormap’没有命名一个类型
../../include/QtGui/private/../../../src/gui/kernel/qt_x11_p.h:300: 错误: ISO C++ 不允许声明无类型的‘Visual’
../../include/QtGui/private/../../../src/gui/kernel/qt_x11_p.h:300: 错误: expected ‘;’ before ‘*’ token
../../include/QtGui/private/../../../src/gui/kernel/qt_x11_p.h:309: 错误: ‘Time’没有命名一个类型
../../include/QtGui/private/../../../src/gui/kernel/qt_x11_p.h:310: 错误: ‘Window’没有命名一个类型
../../include/QtGui/private/../../../src/gui/kernel/qt_x11_p.h:311: 错误: ‘Window’没有命名一个类型
../../include/QtGui/private/../../../src/gui/kernel/qt_x11_p.h:334: 错误: ‘Window’没有命名一个类型
../../include/QtGui/private/../../../src/gui/kernel/qt_x11_p.h:337: 错误: ‘Window’未声明
../../include/QtGui/private/../../../src/gui/kernel/qt_x11_p.h:338: 错误: ‘Window’未声明
../../include/QtGui/private/../../../src/gui/kernel/qt_x11_p.h:338: 错误: ‘Atom’未声明
../../include/QtGui/private/../../../src/gui/kernel/qt_x11_p.h:339: 错误: ‘Atom’未声明
../../include/QtGui/private/../../../src/gui/kernel/qt_x11_p.h:340: 错误: ‘Window’未声明
../../include/QtGui/private/../../../src/gui/kernel/qt_x11_p.h:340: 错误: ‘Atom’未声明
../../include/QtGui/private/../../../src/gui/kernel/qt_x11_p.h:351: 错误: expected ‘,’ or ‘...’ before ‘*’ token
../../include/QtGui/private/../../../src/gui/kernel/qt_x11_p.h:351: 错误: ISO C++ 不允许声明无类型的‘XSelectionRequestEvent’
../../include/QtGui/private/../../../src/gui/kernel/qt_x11_p.h:353: 错误: ‘Atom’未声明
../../include/QtGui/private/../../../src/gui/kernel/qt_x11_p.h:354: 错误: ‘Atom’没有命名一个类型
../../include/QtGui/private/../../../src/gui/kernel/qt_x11_p.h:356: 错误: ‘Atom’未声明
../../include/QtGui/private/../../../src/gui/kernel/qt_x11_p.h:357: 错误: ‘Atom’没有命名一个类型
../../include/QtGui/private/../../../src/gui/kernel/qt_x11_p.h:358: 错误: ‘Atom’未声明
../../include/QtGui/private/../../../src/gui/kernel/qt_x11_p.h:359: 错误: ‘Atom’未声明
../../include/QtGui/private/../../../src/gui/kernel/qt_x11_p.h:359: 错误: ‘Atom’未声明
../../include/QtGui/private/../../../src/gui/kernel/qt_x11_p.h:360: 错误: ‘Atom’在此作用域中尚未声明
../../include/QtGui/private/../../../src/gui/kernel/qt_x11_p.h:360: 错误: 模板参数 1 无效
../../include/QtGui/private/../../../src/gui/kernel/qt_x11_p.h:361: 错误: ‘Atom’未声明
../../include/QtGui/private/../../../src/gui/kernel/qt_x11_p.h:362: 错误: ‘Atom’没有命名一个类型
../../include/QtGui/private/../../../src/gui/kernel/qt_x11_p.h:437: 错误: ISO C++ 不允许声明无类型的‘Atom’
../../include/QtGui/private/../../../src/gui/kernel/qt_x11_p.h:437: 错误: expected ‘;’ before ‘*’ token
../../include/QtGui/private/../../../src/gui/kernel/qt_x11_p.h:439: 错误: ISO C++ 不允许声明无类型的‘Window’
../../include/QtGui/private/../../../src/gui/kernel/qt_x11_p.h:439: 错误: expected ‘;’ before ‘*’ token
../../include/QtGui/private/../../../src/gui/kernel/qt_x11_p.h:441: 错误: ‘Window’没有命名一个类型
../../include/QtGui/private/../../../src/gui/kernel/qt_x11_p.h:444: 错误: ISO C++ 不允许声明无类型的‘Visual’
../../include/QtGui/private/../../../src/gui/kernel/qt_x11_p.h:444: 错误: expected ‘;’ before ‘*’ token
../../include/QtGui/private/../../../src/gui/kernel/qt_x11_p.h:445: 错误: ISO C++ 不允许声明无类型的‘Colormap’
../../include/QtGui/private/../../../src/gui/kernel/qt_x11_p.h:445: 错误: expected ‘;’ before ‘*’ token
../../include/QtGui/private/../../../src/gui/kernel/qt_x11_p.h:449: 错误: ‘Time’没有命名一个类型
../../include/QtGui/private/../../../src/gui/kernel/qt_x11_p.h:450: 错误: ‘Time’没有命名一个类型
../../include/QtGui/private/../../../src/gui/kernel/qt_x11_p.h:476: 错误: ISO C++ 不允许声明无类型的‘Visual’
../../include/QtGui/private/../../../src/gui/kernel/qt_x11_p.h:476: 错误: expected ‘;’ before ‘*’ token
../../include/QtGui/private/../../../src/gui/kernel/qt_x11_p.h:477: 错误: ‘Colormap’没有命名一个类型
../../include/QtGui/private/../../../src/gui/kernel/qt_x11_p.h:660: 错误: ‘Atom’没有命名一个类型
../../include/QtGui/private/../../../src/gui/kernel/qt_x11_p.h:662: 错误: ‘Atom’未声明
../../include/QtGui/private/../../../src/gui/kernel/qt_x11_p.h:691: 错误: ‘FocusOut’在此作用域中尚未声明
../../include/QtGui/private/../../../src/gui/kernel/qt_x11_p.h:692: 错误: ‘FocusIn’在此作用域中尚未声明
../../include/QtGui/private/../../../src/gui/kernel/qt_x11_p.h:693: 错误: ‘KeyPress’在此作用域中尚未声明
../../include/QtGui/private/../../../src/gui/kernel/qt_x11_p.h:694: 错误: ‘KeyRelease’在此作用域中尚未声明
../../include/QtGui/private/../../../src/gui/kernel/qt_x11_p.h:695: 错误: ‘None’在此作用域中尚未声明
../../include/QtGui/private/../../../src/gui/kernel/qt_x11_p.h:696: 错误: ‘RevertToParent’在此作用域中尚未声明
../../include/QtGui/private/../../../src/gui/kernel/qt_x11_p.h:697: 错误: ‘GrayScale’在此作用域中尚未声明
../../include/QtGui/private/../../../src/gui/kernel/qt_x11_p.h:698: 错误: ‘CursorShape’在此作用域中尚未声明
../../include/QtGui/private/../../../src/gui/kernel/qt_x11_p.h:713: 错误: ‘XPoint’在此作用域中尚未声明
../../include/QtGui/private/../../../src/gui/kernel/qt_x11_p.h:713: 错误: 模板参数 1 无效
../../include/QtGui/private/../../../src/gui/kernel/qt_x11_p.h:714: 错误: ‘XRectangle’在此作用域中尚未声明
../../include/QtGui/private/../../../src/gui/kernel/qt_x11_p.h:714: 错误: 模板参数 1 无效
../../include/QtGui/private/../../../src/gui/kernel/qt_x11_p.h:715: 错误: ‘XChar2b’在此作用域中尚未声明
../../include/QtGui/private/../../../src/gui/kernel/qt_x11_p.h:715: 错误: 模板参数 1 无效
make[1]: *** [.obj/release-shared/qapplication.o] 错误 1
make[1]:正在离开目录 `/tmp/qt-x11-opensource-src-4.5.0/src/gui'
make: *** [sub-gui-install_subtargets-ordered] 错误 2
这是什么问题,如何解决啊?还请大家多多帮忙,不胜感激!
|
../../include/QtGui/private/../../../src/gui/kernel/qt_x11_p.h:69:22: error: X11/Xlib.h: 没有该文件或目录
../../include/QtGui/private/../../../src/gui/kernel/qt_x11_p.h:74:23: error: X11/Xutil.h: 没有该文件或目录
../../include/QtGui/private/../../../src/gui/kernel/qt_x11_p.h:75:21: error: X11/Xos.h: 没有该文件或目录
../../include/QtGui/private/../../../src/gui/kernel/qt_x11_p.h:82:23: error: X11/Xatom.h: 没有该文件或目录
有的自带Qt3的,最好先卸载掉。你这里貌似缺少库啊
../../include/QtGui/private/../../../src/gui/kernel/qt_x11_p.h:74:23: error: X11/Xutil.h: 没有该文件或目录
../../include/QtGui/private/../../../src/gui/kernel/qt_x11_p.h:75:21: error: X11/Xos.h: 没有该文件或目录
../../include/QtGui/private/../../../src/gui/kernel/qt_x11_p.h:82:23: error: X11/Xatom.h: 没有该文件或目录
有的自带Qt3的,最好先卸载掉。你这里貌似缺少库啊