root@ubuntu:/home/typ/demo# arm-none-linux-gnueabi-gcc led_app.c -o led_apparm-none-linux-gnueabi-gcc:command not foundroot@ubuntu:/home/typ/demo# echo $PATH/usr/local/arm/opt/FriendlyARM/toolschain/4.4.3/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:
来源:学生作业帮助网 编辑:作业帮 时间:2024/12/01 07:14:01
root@ubuntu:/home/typ/demo# arm-none-linux-gnueabi-gcc led_app.c -o led_apparm-none-linux-gnueabi-gcc:command not foundroot@ubuntu:/home/typ/demo# echo $PATH/usr/local/arm/opt/FriendlyARM/toolschain/4.4.3/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:
root@ubuntu:/home/typ/demo# arm-none-linux-gnueabi-gcc led_app.c -o led_app
arm-none-linux-gnueabi-gcc:command not found
root@ubuntu:/home/typ/demo# echo $PATH
/usr/local/arm/opt/FriendlyARM/toolschain/4.4.3/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games
环境变量设置了,为嘛编译的时候还是arm-none-linux-gnueabi-gcc:command not found
root@ubuntu:/home/typ/demo# arm-none-linux-gnueabi-gcc led_app.c -o led_apparm-none-linux-gnueabi-gcc:command not foundroot@ubuntu:/home/typ/demo# echo $PATH/usr/local/arm/opt/FriendlyARM/toolschain/4.4.3/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:
ubuntu中设置环境变量:gedit /etc/environment,加入arm-none-linux-gnueabi-gcc所在路径,然后source /etc/environment生效,重启系统就OK了