• 6167阅读
  • 2回复

新手安装qt-2.3.2出现The environment vatiable $QTDIR is not set correctly.求解决! [复制链接]

上一主题 下一主题
离线zhanhongchen
 
只看楼主 倒序阅读 楼主  发表于: 2009-10-26
我是个新手,刚开始学,可能问的问题有点弱,请各位高手指教,谢谢。
我在Linux系统上安装。
在根目录下建立新文件夹tool。在tool文件夹下建立文件夹tar存放压缩文件,建立source文件夹存放解压缩文件。
用到三个个软件包:tmake-1.11.tar.gz、qt-x11-2.3.2.tar.gz、qt-embedded-2.3.7.tar.gz。
解压缩qt-x11-2.3.2.tar.gz后将压缩后的软件qt-2.3.2放入到source文件夹下。安装Qt/X11 2.3.2出现了问题。
【root@localhost souce】#cd qt-2.3.2
【root@localhost qt-2.3.2】#export QTDIR=$PWD
【root@localhost qt-2.3.2】#export PATH=$QTDIR/bin:$PATH
【root@localhost qt-2.3.2】#export LD_LIBRARY_PATH=$QTDIR/lib:$LD_LIBRARY_PATH
【root@localhost qt-2.3.2】#./configure –no -opengl
后出现如下内容:
./configure :line 1:dirname:command not found
./configure :line 20:touch:command not found
./configure :line 23:rm:command not found

The environment vatiable $QTDIR is not set correctly.It is currently set to"/tool/source/qt-2.3.2",but it should be set to this directory,which is "/tool/source/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@localhost souce】#cd qt-2.3.2
【root@localhost qt-2.3.2】#export QTDIR=$PWD/qt-2.3.2
【root@localhost qt-2.3.2】#export PATH=$QTDIR/bin:$PATH
【root@localhost qt-2.3.2】#export LD_LIBRARY_PATH=$QTDIR/lib:$LD_LIBRARY_PATH
【root@localhost qt-2.3.2】#./configure –no -opengl

【root@localhost souce】#cd qt-2.3.2
【root@localhost qt-2.3.2】#export QTDIR=$PWD
【root@localhost qt-2.3.2】#export PATH=/tool/source/qt-2.3.2/bin:$PATH
【root@localhost qt-2.3.2】#export LD_LIBRARY_PATH==/tool/source/qt-2.3.2/lib:$LD_LIBRARY_PATH
【root@localhost qt-2.3.2】#./configure –no -opengl
都没有解决问题。我是个新手,恳请高手将详细步骤教我下,不胜感激涕零!!!
离线shiroki

只看该作者 1楼 发表于: 2009-10-29
你用的是什么linux阿, 不可能shell连 rm命里都没有吧, 太神奇了
--
shiro is White
ki is tree
http://www.cuteqt.com
论坛 http://www.cuteqt.com/bbs
博客 http://www.cuteqt.com/blog
博客镜像: http://sites.cuteqt.com/cuteqt
Linux/Qt/嵌入式讨论群 http://qun.qq.com/air/5699823
离线zhanhongchen
只看该作者 2楼 发表于: 2009-10-30
谢谢各位高手,问题已经解决。操作如下:
【root@localhost souce】#cd qt-2.3.2
【root@localhost qt-2.3.2】#vi env.sh
在env.sh文件中保存:
export QTDIR=/tool/source/qt-2.3.2
export PATH=$QTDIR/bin:$PATH
export MANPATH=$QTDIR/doc/man:$MANPATH
export LD_LIBRARY_PATH=$QTDIR/lib:$LD_LIBRARY_PATH
保存退出
【root@localhost qt-2.3.2】#source env.sh
【root@localhost qt-2.3.2】#./configure –platform linux-g++ -thread –system-jpeg –gif –no-xft
快速回复
限100 字节
 
上一个 下一个