Linux 当我编译时,我得到';未找到命令';错误

Linux 当我编译时,我得到';未找到命令';错误,linux,ubuntu-16.04,Linux,Ubuntu 16.04,我正在尝试编译一个C文件到Rolling Spider。但我犯了个错误 Drone: Trying to pack autogenerated code using PackEmbeddedCode... C-files are being packed... C-files packed and ready to be built! Drone: Autogenerated code using PackEmbeddedCode packed! Drone: Trying to build

我正在尝试编译一个C文件到Rolling Spider。但我犯了个错误

Drone: Trying to pack autogenerated code using PackEmbeddedCode...
C-files are being packed...
C-files packed and ready to be built! 
Drone: Autogenerated code using PackEmbeddedCode packed!
Drone: Trying to build code...
/opt/arm-2012.03/bin/arm-none-linux-gnueabi-gcc -c -fPIC -Wall -Werror -o Drone_Compensator.o ../Drone_Compensator.c -lm
make: /opt/arm-2012.03/bin/arm-none-linux-gnueabi-gcc: Command not found
Makefile:4: recipe for target 'all' failed
make: *** [all] Error 127
这是一个代码“DroneUploadEmbeddedCode.sh”

#!/bin/bash

# 1. change folder to where this script is
cd `dirname $0`
SCRIPTPATH=$(pwd)

# 1.2 Exit the script if a command fails
set -e

# 2. Pack autogenerated c-code
echo "Drone: Trying to pack autogenerated code using PackEmbeddedCode..."
cd utils/
./PackEmbeddedCode
cd ..
echo "Drone: Autogenerated code using PackEmbeddedCode packed!"

# 3. Build code
echo "Drone: Trying to build code..."
cd ../trunk/embcode/build_arm
make
cd $SCRIPTPATH
echo "Drone: Code built!"

# 4. ftp into the drone and upload the shared library
echo "Drone: Trying to upload shared library..."

echo "> Drone: FTP into the drone"
/usr/bin/expect <<SCRIPT
set timeout -1;
spawn ftp 192.168.1.1;
expect "(192.168.1.1:$USER):";
send "\r";
expect "ftp>";
send "put ../DroneExchange/librsedu.so librsedu.so\r";
expect "ftp>";
send "exit\r";
expect eof
SCRIPT

echo "Drone: Shared library uploaded!"
所以,我试着跟踪这些文件。我在正确的文件夹中找到了“armnonelinuxgnueabigcc”文件。还有,我可以在终点站看到

> ~/Downloads/RollingSpiderEdu-master/MIT_MatlabToolbox/libs/gcc-arm-Toolchain/opt/arm-2012.03/bin$
> ls arm-none-linux-gnueabi-addr2line  arm-none-linux-gnueabi-gdbtui
> arm-none-linux-gnueabi-ar         arm-none-linux-gnueabi-gprof
> arm-none-linux-gnueabi-as         arm-none-linux-gnueabi-ld
> arm-none-linux-gnueabi-c++        arm-none-linux-gnueabi-nm
> arm-none-linux-gnueabi-c++filt    arm-none-linux-gnueabi-objcopy
> arm-none-linux-gnueabi-cpp        arm-none-linux-gnueabi-objdump
> arm-none-linux-gnueabi-elfedit    arm-none-linux-gnueabi-ranlib
> arm-none-linux-gnueabi-g++        arm-none-linux-gnueabi-readelf
> arm-none-linux-gnueabi-gcc        arm-none-linux-gnueabi-size
> arm-none-linux-gnueabi-gcc-4.6.3  arm-none-linux-gnueabi-sprite
> arm-none-linux-gnueabi-gcov       arm-none-linux-gnueabi-strings
> arm-none-linux-gnueabi-gdb        arm-none-linux-gnueabi-strip
这是文件属性

 file -L arm-none-linux-gnuea
bi-gcc
arm-none-linux-gnueabi-gcc: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux.so.2, for GNU/Linux 2.2.5, stripped
这是我的电脑

 ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 2.6.32, BuildID[sha1]=504637666875a5d526ef51acfe601c99efc99114, stripped

这里有什么问题?这个问题是因为32位和64位之间的差异吗?

您需要替换生成文件中的行

CC=

具有要使用的编译器的正确路径

从你的帖子上看,这似乎是


~/Downloads/RollingSpiderEdu master/MIT_MatlabToolbox/libs/gcc arm Toolchain/opt/arm-2012.03/bin/arm none linux gnueabi gcc
您需要替换Makefile中的行

CC=

具有要使用的编译器的正确路径

从你的帖子上看,这似乎是

~/Downloads/RollingSpiderEdu master/MIT_MatlabToolbox/libs/gcc arm Toolchain/opt/arm-2012.03/bin/arm none linux gnueabi gcc

 ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 2.6.32, BuildID[sha1]=504637666875a5d526ef51acfe601c99efc99114, stripped