执行脚本是报错./cross.install: 25: Syntax error: "do" unexpected (expecting "fi")
来源:互联网 发布:vggnet 网络结构 编辑:程序博客网 时间:2024/06/05 11:35
文件名为cross_install
#!/bin/sh
每次执行这个文件的时候总是会报错如下:
root@liguowang-desktop:/home/Hi3716C/Hi3716CV100R001C00SPC090/source/osdrv/toolchains/arm-vfp_uclibc-linux-gnu# ./cross.install
./cross.install: 25: Syntax error: "do" unexpected (expecting "fi")
我仔细与其他可以运行的arm-hismall-linux/cross.install没有什么差别
在网上找了答案:
说将 #!/bin/sh 改为 #!/bin/bash 就OK了
如果脚步很多改脚本不是办法,还是给/bin/sh的指向比较好
修改Ubuntu的/bin/sh的默认连接:
终端输入:
root@zhanghc-Ubuntu:~# cd /bin
root@zhanghc-Ubuntu:/bin# ls -l /bin/sh
lrwxrwxrwx 1 root root 4 2008-04-28 19:59 /bin/sh -> dash //默认位dash
root@zhanghc-Ubuntu:/bin# ln -sf bash /bin/sh //软链接 -f表示强制
root@zhanghc-Ubuntu:/bin# ls -l /bin/sh
lrwxrwxrwx 1 root root 4 2008-05-01 22:51 /bin/sh -> bash //现在位bash了
- 执行脚本是报错./cross.install: 25: Syntax error: "do" unexpected (expecting "fi")
- 执行脚本是报错./cross.install: 25: Syntax error: "do" unexpected (expecting "fi")
- 解决执行脚本报syntax error: unexpected end of file或syntax error near unexpected token `fi'错误的问题
- Syntax error: word unexpected (expecting ")")
- Syntax error: word unexpected (expecting ")")
- Syntax error: word unexpected (expecting ")")
- syntax error, unexpected T_OBJECT_OPERATOR, expecting ')'
- Ubuntu zookeeper-3.5.0-alpha启动错误 zkEnv.sh: Syntax error: "(" unexpected (expecting "fi")
- linux下安装zookeeper报错Syntax error: "(" unexpected (expecting "fi")
- line 1: syntax error: unexpected word (expecting ")")
- line: 1: Syntax error: word unexpected (expecting ")")
- line 1: syntax error: word unexpected (expecting ")")
- syntax error: unexpected word (expecting ")")错误解决办法
- thinkphp syntax error, unexpected ')', expecting T_VARIABLE or '$'
- syntax error: unexpected word (expecting ")")问题
- Syntax error: word unexpected (expecting ")")问题处理
- 出错syntax error: word unexpected (expecting ")")解决
- 执行ubuntu脚本出现 Syntax error: "(" unexpected错误
- Android ApiDemos示例解析(120):Views->Gallery->2. People
- 数据结构面试之一——单链表常见操作
- 对架构师而言,什么最重要?
- 链表集锦
- DataReader对象转换为实体类与给存储过程批量添加参数
- 执行脚本是报错./cross.install: 25: Syntax error: "do" unexpected (expecting "fi")
- springMail发送邮件,转载别人的,感觉挺有用的
- ArcGIS Runtime 加载SHAPE数据的另一种方式-动态图层
- C# SQLLite
- HttpCore组件案例程序(Java描述) (Http Components-- HttpCore Examples)
- 293. Misfortures never come alone. 祸不单行
- 无线网络-LTE (03) 通信过程之 TAU procedures -- with Serving GW change
- 写博客的缘由
- KVC,KVO,NSNotification总结