红联Linux门户
Linux帮助

解决line: 1: Syntax error: word unexpected (expecting ")")

发布时间:2016-05-24 15:13:54来源:linux网站作者:prettyshuang

开发板上运行可执行程序报出错误:

line1: 1: Syntax error: word unexpected (expecting ")")


解决:

1.编译器的问题

用arm-linux-gcc编译,可能原来是用gcc编译的。假如是脚本,#!/bin/sh 改 #!/bin/bash试试

2.文件完整性

重新烧写或上传一遍

3.编译命令问题

比如我的一个测试程序test.c

arm-linux-gcc -o test.o -c test.c    //编译为目标文件

arm-linux-gcc -o test.o test.c        //编译为可执行文件


本文永久更新地址:http://www.linuxdiyf.com/linux/20911.html