开发者

Problem in setting path for android sdk in ubuntu

开发者 https://www.devze.com 2022-12-27 00:33 出处:网络
export PATH=${/home/mohit/}:<android-sdk-linux_86>/tools this is what i am using.. error:-- bash: PATH=${/home/mohit/}:: bad substitution
 export PATH=${/home/mohit/}:<android-sdk-linux_86>/tools

this is what i am using..

error:--

bash: PATH=${/home/mohit/}:: bad substitution

this is the path of sdk

mohit@mohit-laptop:~/android-sdk-li开发者_如何学JAVAnux_86$ pwd
/home/mohit/android-sdk-linux_86


Typically you will use

export PATH=${PATH}:<added path here>

try that, to append to your $PATH variable, or just remove the ${} and set it directly, if you wish to replace it. Also keep in mind, this change is not permanent unless you add this to your .bashrc or .bash_profile or equivalent scripts. You can reload them with the

source .bash_profile

command without having to re-login.


The problem is that ${/home/mohit/} is actually treating /home/mohit/ as a variable and attempting to dereference it. My guess is that what you really wanted to do was:

export PATH="$PATH":"$HOME/android-sdk-linux_86/tools"


You can edit your /etc/profile to add the path you need. Like this:

JAVA_HOME=/opt/jdk1.6.0_30
CLASSPATH=.:$JAVA_HOME/lib:$JAVA_HOME/jre/lib
export JAVA_HOME
export CLASSPATH
PATH=$PATH:$JAVA_HOME/bin:$JAVA_HOME/jre/bin

It is global.


You can maintain a script file under /etc/profile.d/ and we can use it as global

0

精彩评论

暂无评论...
验证码 换一张
取 消