QQ登录

只需一步,快速开始

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 806|回复: 0

请教:我在 .bash_profile 里设置了几个环境变量

[复制链接]
发表于 2006-12-8 09:38:01 | 显示全部楼层 |阅读模式
请教:
我在 .bash_profile 里设置了几个环境变量,可以有一个没有反映,这是什么原因啊?

问题1:
我 vi .bash_profile 得到:
# .bash_profile

# Get the aliases and functions
if [ -f ~/.bashrc ]; then
        . ~/.bashrc
fi

# User specific environment and startup programs

PATH=$PATH:$HOME/bin

export PATH
unset USERNAME
~
~
~
".bash_profile" 20L, 425C


然后我加入环境变量:
# .bash_profile

# Get the aliases and functions
if [ -f ~/.bashrc ]; then
        . ~/.bashrc
fi

# User specific environment and startup programs

PATH=$PATH:$HOME/bin

export PATH
unset USERNAME
export TMAKEDIR=/tmake-1.11
export TMAKEPATH=$TMAKEDIR/lib/qws/linux-x86-g++
export PATH=$TMAKEDIR/bin:$PATH
export QTDIR=/qt-2.3.10
export QTEDIR=$QTDIR
export PATH=$QTDIR/bin:$PATH
export LD_LIBRARY_PATH=$QTDIR/lib:$LD_LIBRARY_PATH
~
~
~
".bash_profile" 20L, 425C


各位大哥我这种设置环境变量的方法对吗?


问题2:
我在终端里敲入:
[root@localhost ~]# echo $QTDIR
/qt-2.3.10
[root@localhost ~]# echo $PATH
/qt-2.3.10/bin:/tmake-1.11/bin:/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/X11R6/bin:/root/bin
[root@localhost ~]# echo $TMAKEPATH
/tmake-1.11/lib/qws/linux-x86-g++
[root@localhost ~]# echo $LD_LIBRARY_PATH

[root@localhost ~]#


各位大哥为什么
[root@localhost ~]# echo $LD_LIBRARY_PATH
得到的是空呢?
是我的环境变量设置错了,还是?


谢谢1
您需要登录后才可以回帖 登录 | 注册

本版积分规则

GMT+8, 2024-9-22 07:12 , Processed in 0.038262 second(s), 16 queries .

© 2021 Powered by Discuz! X3.5.

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