按照正点原子的Qt交叉编译环境搭建教程,最后出现c:command not find的错误。排查原因时观察到执行sudo ./qtcreator.sh
时出现
./qtcreator.sh: 1: ./qtcreator.sh: source: not found
由此知道错误原因:sh和bash是不同的shell,sh中没有source命令。
解决方法:在确保qtcreator.sh的第一行添加了
source /opt/fsl-imx-x11/4.1.15-2.1.0/environment-setup-cortexa7hf-neon-poky-linux-gnueabi
的情况下,使用suod bash ./qtcreator.sh
命令