bash: ./studio.sh: 权限被拒绝(安装 Android-Studio 时出错)
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/21118545/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
bash: ./studio.sh: Permission denied (error installing Android-Studio)
提问by Abhinay
While I was trying to Install Android-Studio and execute the command
当我尝试安装 Android-Studio 并执行命令时
@abhinay-Pc:/android-studio/bin$`./studio.sh
It is showing the error:
它显示错误:
bash: ./studio.sh: Permission denied
I have already exported Java directory to /android-studio/bin
folder`
我已经将 Java 目录导出到文件/android-studio/bin
夹`
(Java_Home = /usr/lib/jvm/java-7-oracle)
I have the java-7 installed on my system.
我的系统上安装了 java-7。
回答by Sean Perry
You might not have chmod +x studio.sh
try sh ./studio.sh
你可能没有chmod +x studio.sh
尝试sh ./studio.sh
If this was not it, try again like this: sh -x ./studio.sh
. This will show you every line that is run and will help you debug it.
如果这不是它,再试一次这样的:sh -x ./studio.sh
。这将向您显示运行的每一行并帮助您调试它。
Good luck.
祝你好运。
回答by Ilyes Tebbakh
you must change the properties of the studio.sh file and change in the permission to Allow this file to run as program
您必须更改 studio.sh 文件的属性并更改允许此文件作为程序运行的权限