当我运行命令时simg2img
出现以下错误:
/bin/bash: line 1: simg2img: command not found.
MakeFile 片段:
if [ true = true ]; then \
simg2img out/target/product/evk_6sl/system_sparse.img out/target/product/evk_6sl/system.img; \
fi
如果我检查simg2img
在路径中获得
/out/host/linux-x86/bin/simg2img
并且此路径也在$PATH
。
正在运行的sim2img --help
打印件:
~/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
为什么我仍然收到simg2img command not found
错误?
答案1
/bin/bash: line 1: simg2img: command not found.
表示第一行包含simg2img
无法找到的命令。
您可以尝试检查此行(nano /out/host/linux-x86/bin/simg2img
);它可能只是一种依赖关系。