Sudo android return "sudo: android: command not found"
I use Ubuntu 15.04 - Gnome,
For any reason when I try to execute the function "Android" its return
bash: /opt/android-sdk-linux/tools/android: Permission deniedand when I type sudo android the bash return
sudo: android: command not foundAny solution? This can affect to "Cordova"?
Thanks in advance.
Update:
file /opt/android-sdk-linux/tools/android
/opt/android-sdk-linux/tools/android: POSIX shell script, ASCII text executableuname -a
Linux Hope 3.19.0-33-generic #38-Ubuntu SMP Fri Nov 6 18:18:12 UTC 2015 x86_64 x86_64 x86_64 GNU/Linuxlsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 15.04
Release: 15.04
Codename: vividstat /opt/android-sdk-linux/tools/android
File: ‘/opt/android-sdk-linux/tools/android’
Size: 3498 Blocks: 8 IO Block: 4096 regular file
Device: 801h/2049d Inode: 786692 Links: 1
Access: (0744/-rwxr--r--) Uid: (249512/ UNKNOWN) Gid: ( 5000/ UNKNOWN)
Access: 2015-11-10 15:01:53.838926405 +0200
Modify: 2015-10-14 10:44:06.000000000 +0300
Change: 2015-11-10 14:50:37.671590304 +0200
Birth: - 2 1 Answer
There is an unknown group (gid 5000) and an unknown user (uid 249512) and ... I guess ... you are not the user with the uid 249512.
Set the permissions - everything in /opt should have the owner root and the group root:
sudo chown -R root:root /opt/android-sdk-linuxSet the executable rights:
sudo chmod 755 /opt/android-sdk-linux/tools/androidRun the script with sudo rights (a very bad idea)
sudo /opt/android-sdk-linux/tools/androidso better change the directory
cd /opt/android-sdk-linux/tools; sudo ./androidIf /opt/android-sdk-linux/tools/ is in your PATH this will work too:
sudo android And once again: Using sudo to run this application is not necessary and a VERY bad idea!
But I suspect that there are additional problems with other files in your /opt/android-sdk-linux installation.