Make: Command not found, but command exists?

牧云@^-^@ 提交于 2019-12-25 06:28:27

问题


So I have a make file which uses arm-eabi-none-xxx commands, but when I run make I get a "Command not Found" error:

bash-4.2$ make
arm-none-eabi-as -I source/ source/mailbox.s -o build/mailbox.o
make: arm-none-eabi-as: Command not found
make: *** [build/mailbox.o] Error 127

Weird bit, is the command exists and is in my path (the following is in the same directory as the makefile):

bash-4.2$ arm-none-eabi-as --version
GNU assembler (Sourcery G++ Lite 2008q3-66) 2.18.50.20080215
This assembler was configured for a target of `arm-none-eabi'.

And I can run the command that make is running:

bash-4.2$ arm-none-eabi-as -I source/ source/mailbox.s -o build/mailbox.o
bash-4.2$ ls build/
README  mailbox.o

So. I read that make uses the shell to execute commands if ./ is in the current path, so I've tried that but no good. Originally I couldn't run arm-none-eabi-as at all as it's a 32-bit binary and I'm running on a 64 bit system (Slackware 14.0) but I followed the instructions here to install the 32-bit libraries etc..

So the question... what stupid schoolboy mistake am I making?


回答1:


Did you run 'make' as sudo, or root? In that case, it doesn't work for me. What I had to do was mkdir a 'build' folder, and simply run 'make'. It worked.



来源:https://stackoverflow.com/questions/15000303/make-command-not-found-but-command-exists

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!