通过PuTTY设置Ubuntu 14.04环境变量

时间:2016-03-09 16:10:36

标签: ubuntu environment-variables ubuntu-14.04 putty

我需要为我打算使用的Python包设置一个环境变量。变量必须是:

DoCmd.RunSQL "SELECT 'VCAP0112' AS VCAP0112, VCAP0112.[RECV IND] AS OMU, VCAP0112.[LEGACY ACCT], Sum(VCAP0112.[1 to 30 Day]) AS [0 - 30], " _
        & "Sum(VCAP0112.[31 to 60 Day]) AS [31 - 60], Sum(VCAP0112.[61 to 90 Day]) AS [61 - 90], Sum(VCAP0112.[91 to 120 Day]) AS [91 -  120], " _ 
        & "Sum(VCAP0112.[Greater than 120]) AS [+120], Sum(VCAP0112.[Pmt Difference]) AS TOTAL " _
        & "FROM Urcrosswalk INNER JOIN VCAP0112 ON Urcrosswalk.[Legacy GL] = VCAP0112.[LEGACY ACCT] " _
        & "WHERE (((Left([VCAP0112].[area], 2))=80 Or (Left([VCAP0112].[area], 2))= 81)) " _
        & "GROUP BY 'VCAP0112', VCAP0112.[RECV IND], VCAP0112.[LEGACY ACCT] " _
        & "HAVING (((VCAP0112.[RECV IND])='O' Or (VCAP0112.[RECV IND])='M' Or (VCAP0112.[RECV IND])='U'));"

我尝试将此变量添加到许多文件中:LD_LIBRARY_PATH="/home/pmj27/software/boost1.60/lib" ~/.pam_environment~/.profile,如下所示:https://help.ubuntu.com/community/EnvironmentVariables

然而,这似乎都没有奏效。如果我在退出时运行~/.bashrc并再次登录printenv则不会显示。我哪里错了?

我正在运行Ubuntu 14.04并通过PuTTY登录。

1 个答案:

答案 0 :(得分:1)

添加

  

export LD_LIBRARY_PATH =" /home/pmj27/software/boost1.60/lib"

到〜/ .bashrc(假设您使用bash作为登录shell)。

退出,然后重新登录,看看printenv向您展示了什么。