急!!!red hat 5中默认安装qt-sdk-linux-x86-opensource-2010.05.1.bin

red hat 5中默认安装qt-sdk-linux-x86-opensource-2010.05.1.bin
安装到最后的时候出现下列的错误:
Error running /opt/qtsdk-2010.05/bin/qpatch
../this_path_is_supposed_to_be_very_long_hopefully_this_is_long_enough/qt" 
"/opt/qtsdk-2010.05/qt" : qpatch:error:file not found
当双击Qt Creator时能打开该软件。
但是Qt的例子界面上显示没有安装:Examples not installed....
而我查看安装包时确实有相应的例子存在!!
我以为是环境变量的问题,于是就:
export QTDIR=/opt/qtsdk-2010.05/qt
export PATH=$QTDIR/bin:$PATH
export MANPATH=$QTDIR/doc/man:$MANPATH
export LD_LIBRARY_PATH=$QTDIR/lib:$LD_LIBRARY_PATH
export QMAKESPEC=/opt/qtsdk-2010.05/qt/mkspecs/linux-g++

然后确认并重启:
[root@localhost ~]# echo $PATH
/opt/qtsdk-2010.05/qt/bin:/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/X11R6/bin:/root/bin
发现还是不行。
我又打开一个自带的例子并运行于是就出现了下列错误:
:: error: The Qt version is invalid: Could not determine the path to the binaries of the Qt installation, maybe the qmake path is wrong?
:: error: The qmake command "<not found>" was not found or is not executable.
当输入这个命令时:
[root@localhost ~]# qmake -v
bash: qmake: command not found
网上有的说当使用Qt Creator来编程的话,Qt环境变量不需要配置。
还请大虾们帮小弟一把,弄了好长时间了阿!!!

作者: jingzhishen   发布时间: 2011-05-26

qmake到底在哪个目录下?

另外环境变量的设置加到~/.bash_profile里去 不要直接在命令行执行。 
然后执行一下source ~/.bash_profile

作者: steptodream   发布时间: 2011-05-26