line: 1: Syntax error: word unexpected (expecting ")")
开发板上运行可执行程序报出错误:
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 //编译为可执行文件
line: 1: Syntax error: word unexpected (expecting ")")的更多相关文章
- 可执行程序无法在Linux上运行,显示line 1: syntax error: word unexpected (expecting ") .
[问题]用arm-linux-gcc编译出来的可执行文件clkCtl,下载到板子上,在Linux下不能运行:./clkCtl: line 1: syntax error: word unexpecte ...
- line1: 1: Syntax error: word unexpected (expecting ")")
行时错误:line1: 1: Syntax error: word unexpected (expecting ")") 查看Makefile编译规则,可能由于依赖关系造成编译器使 ...
- 执行目标文件引发的问题:syntax error: word unexpected (expe...
今天不小心把一个目标文件当成了可执行文件放到开发板上进行执行,结果出现了这样一个问题:./hello_qt: line 1: syntax error: word unexpected (expect ...
- Linix登录报"/etc/profile: line 11: syntax error near unexpected token `$'{\r''"
同事反馈他在一测试服务器(CentOS Linux release 7.2.1511)上修改了/etc/profile文件后,使用source命令不能生效,让我帮忙看看,结果使用SecureCRT一登 ...
- -bash: /etc/profile: line 11: syntax error near unexpected token `$'{\r''报错问题解决
在Linux系统配置Java环境变量之后执行 source /etc/profile指令报:-bash: /etc/profile: line 11: syntax error near unexpe ...
- 解决Linux下编译.sh文件报错 unexpected operator Syntax error: word unexpected
执行一个脚本 发现报语法错误,但是在其他机器上运行都没有问题 唯一的区别就是 一个是centos机器 报错的是ubuntu 网上搜索了一下 因为Ubuntu默认的sh是连接到dash的,又因为da ...
- 写shell,运行出错:syntax error near unexpected token `$’do\r”
cygwin下面写shell,运行出错:syntax error near unexpected token `$’do\r” 写shell,运行出错:syntax error near unexpe ...
- 执行shell脚本提示“syntax error near unexpected token for((i=0;i<$length;i++))”
sh脚本例如以下: #!/usr/bin/env bash county="3 4 5 6 7 8 9 10 11 12 16 29 39 44 53 62 72 84 97 115 128 ...
- syntax error near unexpected token `do(写的shell脚本出现格式问题)--->1.问题2.展示信息3.解决方案
1问题:Linux和windows下的回车换行符不兼容的问题 [root@node-01 script]# sh start_zk.sh art_zk.sh: line 3: syntax error ...
随机推荐
- OpenCV学习(4) Mat的基本操作(1)
图像在OpenCV中都是通过Mat类来存储的,Mat可以用来表示N维矩阵,当然用的最多的还是二维矩阵. Mat类有两部分组成:第一部分是头信息,这些信息主要用来描述矩阵,比如矩 ...
- 设计模式学习--迭代器模式(Iterator Pattern)和组合模式(Composite Pattern)
设计模式学习--迭代器模式(Iterator Pattern) 概述 ——————————————————————————————————————————————————— 迭代器模式提供一种方法顺序 ...
- css3动画属性系列之transform细讲旋转rotate
1.语法: transform: none | <transform-function> [<transform-function>]* 2.取值: none ...
- [Grunt] Development Automation Tasks with Grunt
With Grunt you can automate core tasks for your AngularJS project. In this lesson we will take a loo ...
- DOS命令:列出某目录下的所有文本文件名并重定向到某文件
命令如下: >dir /b *.txt>output.txt dir无需说,/b 是只要文件名,>是重定向. 2013年11月7日13:36:57
- 黑马程序员_<<TCP>>
---------------------ASP.Net+Android+IOS开发..Net培训.期待与您交流! -------------------- 1. TCP/IP 1.概述 要建立连接, ...
- KineticJS教程(3)
KineticJS教程(3) 作者: ysm 3.图形对象 3.1.Shape Kinetic提供了一个Shape对象用于在层上绘制图形,我们可以通过Kinetic.Shape()构造方法返回一个S ...
- 算法笔记_137:二分图的最大匹配(Java)
目录 1 问题描述 2 解决方案 1 问题描述 何为二分图的最大匹配问题? 引用自百度百科: 首先得说明一下何为匹配: 给定一个二分图G,在G的一个子图M中,M的边集{E}中的任意两条边都不依附于 ...
- 算法笔记_030:回文判断(Java)
目录 1 问题描述 2 解决方案 1 问题描述 给定一个字符串,如何判断这个字符串是否是回文串? 所谓回文串,是指正读和反读都一样的字符串,如madam.我爱我等. 2 解决方案 解决上述问题,有 ...
- linux系统中的DNS服务器介绍
http://lq2419.blog.51cto.com/1365130/1172269 DNS:Domain Name Service,linux上的DNS服务是基于一种软件BIND实现的.BIND ...