解决/bin/sh: 1: syntax error: "(" unexpected错误,以及更换bash仍然无法解决的问题
编译文件的时候出现 /bin/sh: 1: syntax error: "(" unexpected 错误。
网上查到的资料都是:
(1)在脚本前写#!/bin/bash
(2)执行dpkg-reconfigure dash然后选No
然而做了这两步之后,同样的错误还是照样出现。
在Makefile中查到出问题的是make语句中的$(shell pwd)部分。
后来发现代码目录的目录名中包含了括号!把目录改名,去掉名字中的括号,恢复正常。
解决/bin/sh: 1: syntax error: "(" unexpected错误,以及更换bash仍然无法解决的问题的更多相关文章
- openwrt-scripts/config/mconf: Syntax error: “(” unexpected错误解决
scripts/config/mconf: Syntax error: “(” unexpected错误解决 从其他地方复制而来的openwrt SDK,放在本地执行make menuconfig时出 ...
- 解决执行脚本报syntax error: unexpected end of file或syntax error near unexpected token `fi'错误的问题
参考:https://blog.csdn.net/u012453843/article/details/69803244 解决执行脚本报syntax error: unexpected end of ...
- 不同系统执行相同shell脚本,出现Syntax error: "(" unexpected错误解决
例如shell脚本在centos系统中能正常执行,而在ubuntu系统中执行会出现类似Syntax error: "(" unexpected的错误,一般这种是因为sh与bash有 ...
- 执行shell脚本遇到错误syntax error: unexpected "then" (expecting "}")
今天执行脚本的时候遇到错误,如下图: root@ApFree:/usr/sbin# ./conntrack_num_graph.sh ./conntrack_num_graph.sh: line : ...
- shell 报错:syntax error: unexpected end of file
有时执行脚本时会报错: [root@host1 shell]# sh -x test.sh + $'\r' : command not found test.: syntax error: unexp ...
- syntax error, unexpected '['
在用ThinkPHP框架做了个小的应用 我在本地搭建的服务器,进行测试好着的. 但是放到别的地方后,出现以下报错 syntax error, unexpected '[' 错误位置是在我自己写的一个A ...
- Ubuntu zookeeper-3.5.0-alpha启动错误 zkEnv.sh: Syntax error: "(" unexpected (expecting "fi")(转)
昨天小猿我把Ubuntu Server64位上的 zookeeper换成了最新版本的,结果启动的时候出错:之前zookeeper-3.3.6是没有任何问题的,换成了zookeeper3.5出现了下面的 ...
- 【问题解决】syntax error: unexpected end of file或-bash: ./full_build.sh: /bin/bash^M: bad interpreter: No
在阅读的过程中有不论什么问题,欢迎一起交流 邮箱:1494713801@qq.com QQ:1494713801 运行一个脚本full_build.sh 时, 一直是提示我: -bash: ./ ...
- Windows登录服务器CLI运行脚本出现 syntax error: unexpected end of file 错误的解决
0.前言 通常我们在编辑 Linux 服务器上的文件时,直接在 Linux 环境比较麻烦(当然熟练使用 VIM 的程序员除外哈哈),有时我们会使用 Windows 将文件编辑好再上传到服务器端,我用的 ...
随机推荐
- 消除 transition 闪屏
.css { -webkit-transform-style: preserve-3d; -webkit-backface-visibility: hidden; -webkit-perspectiv ...
- C++字符串(srtring)反转
对称平方数 题目描述 打印所有不超过n(n<256)的,其平方具有对称性质的数.如11*11=121. 分析: 1.首先使用函数to_string将int转化为string: 2.然后将字符串反 ...
- iOS safari 苹果手机如何阻止页面弹性“橡皮筋效果”?
苹果上这个上下弹的效果对于有固定导航的页面,体验很不好 知乎上搜到一个并不是完美方案:https://www.zhihu.com/question/22256539 完美方案是有个国外插件叫:prev ...
- 【转】Robot Framework作者建议如何选择自动化测试框架
原文:http://www.infoq.com/cn/news/2012/06/robot-author-suggest-autotest 软件自动化测试,作为手工测试的替代,越来越受到关注.Pekk ...
- u-boot移植(十)---代码修改---支持nor flash
一.问题定位 开发板重启后打印了2个提醒和一个错误,caches的提醒先不看,看看flash和nand下面的提醒,bad CRC,Using default enviroment,我们可以定位Usin ...
- Postfix - Extmail 邮箱系统
Postfix Dovecot Extmail 邮箱系统早前的内部邮箱系统重新整理下:现在Extmail官方有集成镜像的EMOS_1.6_x86_64免费版:可直接下载安装: 系统环境: linux ...
- js取最大最小值
链接:https://www.cnblogs.com/waitingbar/p/4323600.html js取最小最大值--Math.min().math.max() 一.Math.min() 返回 ...
- sonar扫描java、js、jsp技术
最近在弄sonar扫描的事情,之前一直只能扫描java代码,这样统计出来的数据上报领导很多开发人员不服(说我不用写jsp了不用写js了?), 那么好,于是乎继续整sonar,在官网中看到sonar其实 ...
- 7、完整版的strcpy函数
char * strcpy( char *strDest, const char *strSrc ) { assert( (strDest != NULL) && (strSrc != ...
- python - class类(归一化设计)
归一化设计 #继承同时具有两种含义 # 1.继承基类的方法,并且做出自己的改变或者扩展 # 2.声明某个子类兼容于某个基类,定义一个接口类,子类继承接口类,并且实现接口中定义的方法. # 实践中,继承 ...