Make:找不到命令,但是命令存在? [英] Make: Command not found, but command exists?
问题描述
所以我有一个使用arm-eabi-none-xxx
命令的make文件,但是运行make时出现找不到命令"错误:
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
奇怪的是,该命令是否存在并且在我的路径中(以下与makefile位于同一目录中):
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'.
然后我可以运行make正在运行的命令:
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
所以.我读到,如果./
在当前路径中,make将使用shell执行命令,因此我尝试了该操作,但效果不佳.最初,我根本无法运行arm-none-eabi-as
,因为它是32位二进制文件,并且我正在64位系统上运行(Slackware 14.0)
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?
推荐答案
您是否以sudo或root身份运行"make"?在这种情况下,它对我不起作用. 我要做的是mkdir一个"build"文件夹,然后简单地运行"make".奏效了.
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.
这篇关于Make:找不到命令,但是命令存在?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!