2

when I run a command simg2img I get the following error:

/bin/bash: line 1: simg2img: command not found.

MakeFile Snippet:

if [ true = true ]; then \
        simg2img out/target/product/evk_6sl/system_sparse.img out/target/product/evk_6sl/system.img; \
fi

If I check simg2img is obtained in the path

 /out/host/linux-x86/bin/simg2img

And this path is also in $PATH.

Running sim2img --help prints:

~/Android_Source$ simg2img --help
Usage: simg2img <sparse_image_files> <raw_image_file>

~/Android_Source/out/host/linux-x86/bin$ id 
uid=1000(accord) gid=1000(accord) groups=1000(accord),4(adm),24(cdrom),27(sudo),30(dip),46(plugdev),108(lpadmin),124(sambashare)

~/Android_Source/out/host/linux-x86/bin$ ls -lZ simg2img

-rwxr-xr-x 1 root root ? 282920 Dec  9 17:36 simg2img

~/Android_Source/out/host/linux-x86/bin$ echo $PATH

/usr/lib/jvm/java-7-openjdk-amd64/bin:/home/accord/Android_Source/out/host/linux-x86/bin:/home/accord/Android_Source/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.8/bin:/home/accord/Android_Source/prebuilts/gcc/linux-x86/:/home/accord/Android_Source/prebuilts/gcc/linux-x86/arm/arm-eabi-4.8/bin:/home/accord/Android_Source/development/scripts:/home/accord/Android_Source/prebuilts/devtools/tools:/home/accord/Android_Source/prebuilts/android-emulator/linux-x86_64:/home/accord/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/home/accord/Android_Source/out/host/linux-x86/bin

~/Android_Source/out/host/linux-x86/bin$ which simg2img

/home/accord/Android_Source/out/host/linux-x86/bin/simg2img

Why am I still getting the simg2img command not found error?

3
  • 1
    Add output of id, ls -lZ /out/host/linux-x86/bin/simg2img and echo $PATHto your question.
    – Cyrus
    Dec 10, 2015 at 16:43
  • The error means the command is not in your $PATH. Add the information Cyrus asked for and we should be able to tell you why. Also tell us exactly how you are running the script.
    – terdon
    Dec 10, 2015 at 23:38
  • If possible share the entire line 1 of the script.
    – Jay
    Dec 11, 2015 at 4:44

1 Answer 1

0

/bin/bash: line 1: simg2img: command not found. means that the first line in simg2img contains a command that cannot be found.

You could try inspecting this line(nano /out/host/linux-x86/bin/simg2img); it might just be a dependency.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .