• 6936阅读
  • 3回复

编译QT时遇到的问题自我解决 [复制链接]

上一主题 下一主题
离线上官冲盈
 
只看楼主 倒序阅读 楼主  发表于: 2010-05-27
最近安装qt-x11-2.3.2,文件存储路径为/usr/qtopia/qt-2.3.2,我用的操作系统是Ubuntu8.04,设置好环境变量,诸如QTDIR,可是在执行命令:./configure -no-opengl时总是出现如下错误:
strive@strive-laptop:/usr/qtopia/qt-2.3.2$ ./configure -no-opengl
touch: cannot touch `.test.qt.': Permission denied
rm: cannot remove `.test.qt.': No such file or directory


   The environment variable $QTDIR is not set correctly. It is currently
   set to "/usr/qtopia/qt-2.3.2", but it should be set to this directory,
   which is "/usr/qtopia/qt-2.3.2".

   Please read the INSTALL file for instructions on how to set $QTDIR
   correctly. If you have set $QTDIR in your .profile or .login, you
   will need to log out and log in again to make the setting effective.
通过错误提示认为是因为自己权限不够,于是执行如下命令:
strive@strive-laptop:/usr/qtopia/qt-2.3.2$ sudo ./configure -no-opengl
[sudo] password for strive:


   The environment variable $QTDIR is not set correctly. It is currently
   set to "", but it should be set to this directory,
   which is "/usr/qtopia/qt-2.3.2".

   Please read the INSTALL file for instructions on how to set $QTDIR
   correctly. If you have set $QTDIR in your .profile or .login, you
   will need to log out and log in again to make the setting effective.
显然依然不可以,网上搜索未果。
后来发现可以如此解决:
首先,启用ROOT用户:$sudo passwd root
这样设置ROOT密码,然后执行如下命令:su
切换到ROOT用户,然后再以root身份设置QTDIR环境变量即可!


乐乐呵呵每一天……
离线上官冲盈
只看该作者 1楼 发表于: 2010-05-27
昨天我发帖居然没有人理我,自己顶!!
乐乐呵呵每一天……
离线上官冲盈
只看该作者 2楼 发表于: 2010-05-28
In file included from kernel/qwscommand_qws.h:37,
                 from kernel/qwsproperty_qws.h:37,
                 from kernel/qwindowsystem_qws.h:44,
                 from kernel/qgfxlinuxfb_qws.cpp:47,
                 from kernel/qgfxraster_qws.cpp:5689:
kernel/qwsutils_qws.h:37:41: error: qwssocet_qws.h: No such file or directory
kernel/qgfxraster_qws.cpp: In member function ‘virtual void QGfxRasterBase::drawText(int, int, const QString&)’:
kernel/qgfxraster_qws.cpp:1382: warning: comparison is always false due to limited range of data type
kernel/qgfxraster_qws.cpp:1382: warning: comparison is always false due to limited range of data type
kernel/qgfxraster_qws.cpp: At global scope:
编译安装QT/e,出现上述kernel/qwsutils_qws.h:37:41: error: qwssocet_qws.h: No such file or directory错误怎么办?求大家了
乐乐呵呵每一天……
离线wd007

只看该作者 3楼 发表于: 2010-05-28
不用root用户身份,而只是你登陆时的身份,应该也是可以设置环境变量的。
欢迎访问我的博客,一起学习提高
http://blog.csdn.net/qter_wd007
快速回复
限100 字节
 
上一个 下一个