写了个脚本用cat>>EOF报错如下: input01.sh: line 11: warning: here-document at line 4 delimited by end-of-file (wanted `EOF')input01.sh: line 12: syntax error: unexpected end of file 原因:最后的EOF多了个空格,取消即可.…
在阅读的过程中有不论什么问题,欢迎一起交流 邮箱:1494713801@qq.com    QQ:1494713801 运行一个脚本full_build.sh 时, 一直是提示我: -bash: ./full_build.sh: /bin/bash^M: bad interpreter: No such file or directory 或提醒  syntax error: unexpected end of file 出现上面错误的原因之中的一个是脚本文件是DOS格式的, 即每一行的行尾以\…
有时我们在linux下执行一个sh文件,会报错“SYNTAX ERROR:UNEXPECTED END OF FILE”,这个现象主要是工作的系统环境改变造成的. 若最初脚本中是在windows下,使用sublime编辑器写.将shell脚本传至linux中:使用命令bash -x SCRIPT检查语法总是出一个错误 syntax error:unexpected end of file. 原因:dos文件传输到unix系统时,会在每行的结尾多一个^M,在vim的时候,当你用如下命令查看:cat…
出现这个错误的原因就是语法错误,肯定是PHP程序的书写不规范造成,PHP语句标识符错了,没有在php.ini中开启短标签!八成是这个原因,啊啊啊! 今天在写PHP程序的时候总是出现这样的错误:Parse error: syntax error, unexpected end of file in *.php on line *,然后我就根据提示,找到那个文件,然后错误中总是提示最后一行出错,我找到最后一行发现是</html>,晕的,这能有什么错误,找了好久才找到问题所在,拿来分享. 出现这个错…
Parse error: syntax error, unexpected end of file in *.php on line * 解决方法   这篇文章主要介绍了PHP错误Parse error: syntax error, unexpected end of file in test.php on line 12解决方法,需要的朋友可以参考下 今天在写PHP程序的时候总是出现这样的错误:Parse error: syntax error, unexpected end of file…
同一脚本sh 脚本名 执行时报Syntax error: "(" unexpected:而./脚本名执行不报错,为什么呢 脚本内容如下: function usage(){ echo "usage:$0 url" exit } function check_url(){ -T $ ] then echo "$1 is ok" else echo "$1 is not ok " fi } function main(){ ] t…
今天用make 编译 蹦到 bash ‘/bin/sh: Syntax error: “(” unexpected 和 /bin/sh: [[: not found 这种莫名奇妙的错误 原因是是linux将sh指向了dash而不是bash 直接改配置 dpkg-reconfigure dash 选默认不是dash…
在ubuntu电脑上安装lnmp环境,执行下面命令时 sudo sh ubuntu.sh 报错误:ubuntu.sh: 113: ubuntu.sh: Syntax error: "(" unexpected 原因: 兼容性问题,因为linux将sh默认指向了dash,而不是bash 解决办法:sudo dpkg-reconfigure dash 在弹出的窗口选择no 然后再重新执行 sudo sh ubuntu.sh就可以了…
昨天小猿我把Ubuntu Server64位上的 zookeeper换成了最新版本的,结果启动的时候出错:之前zookeeper-3.3.6是没有任何问题的,换成了zookeeper3.5出现了下面的错误: root@host8:/usr/solrcould/service1/zookeeper-3.5.0-alpha# sh bin/zkServer.sh start JMX enabled by default bin/zkServer.sh: 95: /usr/solrcould/serv…
在Ubuntu下执行脚本报错 c.sh: Syntax error: "(" unexpected 解决办法 sudo dpkg-reconfigure dash ubuntu@ip----:~$ ll /bin/sh lrwxrwxrwx root root Dec : /bin/sh -> dash*        …
编译文件的时候出现 /bin/sh: 1: syntax error: "(" unexpected 错误. 网上查到的资料都是: (1)在脚本前写#!/bin/bash (2)执行dpkg-reconfigure dash然后选No 然而做了这两步之后,同样的错误还是照样出现. 在Makefile中查到出问题的是make语句中的$(shell pwd)部分. 后来发现代码目录的目录名中包含了括号!把目录改名,去掉名字中的括号,恢复正常.…
今天呢想学习一下zabbix监控一下我的服务情况,然后就开始安装我的zabbix服务,首先LNMP环境准备好了,Nginx版本为1.6.3,php版本为5.3.27,MySQL版本为二进制包安装的5.5.49,一切准备就绪,到了网页安装的过程,输入地址就是不显示网页,然后看了我的Nginx的错误日志如下: // :: [error] #: * FastCGI sent in stderr: "PHP message: PHP Parse error: syntax error, unexpect…
编译出来的程序在arm平台上运行时,出现下面的错误. / # wpa_supplicant -B -c/etc/wpa_wpa2.conf  -iwlan0 /bin/wpa_supplicant: line 1: syntax error: unexpected word (expecting ")") 这个问题的原因是  编译器造成的!!! 我们在UBUNTU 环境下使用file命令,来查看这个环境.(因为我的单板的文件系统是挂载在UBUNTU上的,所以可以在UBUNTU上使用fi…
今天运行laravel项目发现出现错误: Parse error: syntax error, unexpected '?'  ..\vendor\laravel\framework\src\Illuminate\Foundation\helpers.php on line 233 原来是php版本过低的问题,调高就好了,具体php版本查看官网.记录一下. PHP >= 5.6.4…
以下代码处出现了syntax error: unexpected token 'struct' at line 33的错误 struct a2v { float4 vertex_position : POSITION; float3 normal : NORMAL; } struct v2f { float4 pos : SV_POSITION; fixed3 color_in : COLOR; } 原因是忘记添加结构体最后的;符号. 把结构体最后的;加上就解决了.…
Ubuntu/Debian为了加快开机速度,用dash代替了bash. dpkg-reconfigure dash 选择 No,取消dash即可,要重新开启dpkg-reconfigure dash选择Yes即可. 或者dash启用时使用bash xxxxx.sh 另一种可能是: sh文件里的 #!bin/bash 改成 #!/bin/bash…
g刚学习tp5就遇到了这个问题  百思不得其解,看到官网说明 是基于PHP5.4 设计的  打开 phpstudy版本一看 就呵呵呵了 .还是5.3的版本.更换版本之后 就ok了.…
1. 出现以上问题 是因为 php版本低于5.6, 因为我系统原有的默认php是5.3,装laravel的php是指定的5.6.21版本,所以在执行 laravel对应的php artisan . php composer 命令 时,均需要进行指定执行的php是那一个,也就是要指定php的绝对路径. 2.报错代码: 根目录>artisan文件…
原因:有可能是兼容性问题 解决方法: 1.sudo dpkg-reconfigure dash   2.在弹出的窗口选择no…
[root@localhost tmp]# ./mq.sh./mq.sh: line 15: warning: here-document at line 10 delimited by end-of-file (wanted `eof')5724 72 1994 2011 1 4 8409 4 2016 02 07 18 56 09 0 0 0 2016 02 07 18 56 09 82 0 0 5000 4194304 0 80 20 999999999 999999999 1 0 2 脚…
( ! ) Warning: printf(): Too few arguments in D:\wamp\www\wp-content\themes\arcadexls\games-play.php on line 97 Call Stack # Time Memory Function Location 1 0.0000 241656 {main}( ) ..\index.php:0 2 0.0000 244696 require( 'D:\wamp\www\wp-blog-header.p…
同事反馈他在一测试服务器(CentOS Linux release 7.2.1511)上修改了/etc/profile文件后,使用source命令不能生效,让我帮忙看看,结果使用SecureCRT一登录就发现下面错误信息: Last login: Fri Nov 4 00:42:45 2016 from 10.20.34.14   -bash: $'\r': command not found   -bash: $'\r': command not found   -bash: $'\r': c…
在Linux系统配置Java环境变量之后执行 source /etc/profile指令报:-bash: /etc/profile: line 11: syntax error near unexpected token `$'{\r''如下图: 错误提示信息已经反馈/etc/profile里面有一些异常,初步检查/et/profile文件后,没有发现异常,很是奇怪,后面我使用cat -v /etc/profile检查,发现里面大量的Windows下的换行符.如下截图所示 得知是Linux和wi…
出现这种问题,打开Android monitor的调试信息发现是 android.view.InflateException: Binary XML file line #11: Attempt to invoke virtual method 'boolean... 后经过查找,发现: <view android:layout_width="1dp" android:layout_height="match_parent" android:layout_al…
  $ uname -a Linux debian 3.16.0-4-amd64 #1 SMP Debian 3.16.7-ckt11-1+deb8u6 (2015-11-09) x86_64 GNU/Linux $ python --version Python 2.7.9 $ pip --version pip 8.1.1 from /usr/local/lib/python2.7/dist-packages (python 2.7) $ unset LC_ALL $ pip install…
window10下使用git时 报错如下: $ git add readme.txtwarning: LF will be replaced by CRLF in readme.txt.The file will have its original line endings in your working directory. 意思大概是:LF(换行,Line Feed)将会被CRLF(回车换行,CarriageReturn)替代. 该文件将在工作目录中具有其原始行尾. 报这个警告时是由于文件夹…
关于xxx.so,今天在安装php的模块时候老是报,xxx.so的问题,虽然不影响使用,但作为一名当年的程序员强迫症患者,誓死要把 他搞清楚,后面发现是删除了也没有影响,因为在安装php的时候已经将他们编译进去了,不用重复添加这些模块了, 不信你删除警告的模块,然后执行php -m,看看,肯定有这些模块. PHP Warning: PHP Startup: Invalid library (maybe not a PHP library) 'ctype.so' in Unknown on lin…
由于使用  Spire.Pdf 生成的书签带有 Evaluation Warning : The document was created with Spire.PDF for .NET. 字样 但是它只在第一页头部有显示,我们可以新增一页,并删掉第一页即可 string fileName = @"C:\Users\Administrator\Desktop\图纸\WH440-H111-F01_111分段结构图.pdf"; //创建一个新的PDF实例,导入PDF文件 PdfDocume…
今天在做项目开发时遇到这么一个错误,完整的错误提示信息如下: java.lang.RuntimeException: Unable to start activity ComponentInfo{com.tony.timepicker/com.tony.timepicker.MainActivity}: android.view.InflateException: Binary XML file line #11: Error inflating class com.tony.timepicke…
今天在ubuntu上升级了pip,之后执行pip命令的时候就报错了: Traceback (most recent call last):   File "/usr/bin/pip", line 11, in <module>     sys.exit(__main__.main()) 解决方法: sudo vi /usr/bin/pip 将这三行替换为下面三行: 1 from pip import main 2 if __name__ == '__main__': 3 s…