ubuntu中android sdk设置路径问题
export PATH=${/home/mohit/}:<android-sdk-linux_86>/tools
这就是我正在使用的..
错误:--
bash: PATH=${/home/mohit/}:: bad substitution
这是sdk的路径
mohit@mohit-laptop:~/android-sdk-linux_86$ pwd
/home/mohit/android-sdk-linux_86
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-linux_86$ pwd
/home/mohit/android-sdk-linux_86
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
通常,您将使用
try that 附加到 $PATH 变量,或者如果您想替换它,则删除 ${} 并直接设置它。另请记住,除非您将其添加到 .bashrc 或 .bash_profile 或等效脚本中,否则此更改不是永久性的。您可以使用
命令重新加载它们,而无需重新登录。
Typically you will use
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
command without having to re-login.
问题在于
${/home/mohit/}
实际上将/home/mohit/
视为变量并尝试取消引用它。我的猜测是你真正想做的是: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:您可以编辑 /etc/profile 以添加您需要的路径。
就像这样:
它是全球性的。
You can edit your /etc/profile to add the path you need.
Like this:
It is global.
您可以在/etc/profile.d/下维护一个脚本文件,我们可以将其用作全局
You can maintain a script file under /etc/profile.d/ and we can use it as global