出现此问题的原因,是由系统的兼容性引起的,linux下默认了指向dash而非bash。

linux下Dash改Bash:

1.先查看是使用哪个shell

ls -al /bin/sh

2.#如果是Dash可以用以下方法切回bash(选择NO)

方法一:sudo dpkg-reconfigure  dash

方法二:sudo ln-fs  /bin/bash   /bin/sh

(感谢其他的前辈,这是之前从网上查找后,自己做的笔记,自己整理出来,作为我的成长之路的经历,写此博客是为了记录自己出现过的问题,如有错误或与他人的相似之处请谅解)

Linux 报错:syntax error "C" 解决办法(此处选择bash系统)的更多相关文章

  1. cooking构建工具报错MSBUILD :error MSB4132解决办法

    最近学习cooking构建工具的时候,在自己的笔记本上运行的好好的,项目在公司电脑上clone下来的时候,发现构建报错,逐条查错,试了好多方法也不行 最后在github上找到了答案,只是之前一直没找到 ...

  2. 关于报错“syntax error near unexpected token `”和回车换行

    本来是很简单一个事情,转过来是因为打字机这事比较有趣…… http://blog.csdn.net/xyp84/archive/2009/08/11/4435899.aspx 摘要一下: 回车 换行 ...

  3. JS function document.onclick(){}报错Syntax error on token "function", delete this token

    JS function document.onclick(){}报错Syntax error on token "function", delete this token func ...

  4. 一个参数大小写引发的uploadify报错 "Syntax error, unrecognized expression: #"

     上传控件uploadify 报错"Syntax error, unrecognized expression: #" 版本为 uploadify3.2  报错原因:参数ID[hi ...

  5. JS function document.onclick(){}报错Syntax error on token "function", delete this token - CSDN博客

    原文:JS function document.onclick(){}报错Syntax error on token "function", delete this token - ...

  6. 【玩转Ubuntu】08. Linux报错:Syntax error: "(" unexpected解决办法

    问题: 在MAC上写了一段shell脚本,放到Ubuntu上运行总是报下面这个错误,单步调试都是对的,就是直接运行会报错. bixiaopeng@ubuntu:~/package$ sh packag ...

  7. linux shell 报错 Syntax error: Bad for loop variable

    在linux下写了一个简单的shell,循环10次. test.sh #!/bin/bash ## ##循环10次 ## ; i<; i++)); do echo Good Morning ,t ...

  8. Linux下docker报错syntax error:unexpected protocol at end of statement

    ---恢复内容开始--- [Linux]Shell脚本“syntax error: unexpected end of file”原因及处理 :::https://blog.csdn.net/u013 ...

  9. node-sass 安装失败报错的原因及解决办法(整理)

    npm install 时偶尔遇到报错:没有安装python或node-sass 安装失败的问题,百度之后发现是被墙了,但根据百度的方法换了淘宝镜像和用了vpn都安装失败,最后发现原来是因为没有卸载之 ...

  10. ProxySQL 使用情况报错问题汇总及解决办法

    1.ProxySQL Error: connection is locked to hostgroup 2 but trying to reach hostgroup 1 解决方案:登上proxysq ...

随机推荐

  1. 倍增LCA模板

    //https://www.luogu.org/problemnew/show/P3379#include<bits/stdc++.h> #define maxn 500010 #defi ...

  2. Django2 外键遇到的坑

    # 出版社 class Publisher(models.Model): # 自增.主键 id id = models.AutoField(primary_key=True) # varchar(32 ...

  3. .net core webapi搭建(2)跨域

    Core WebAPI中的跨域处理 在使用WebAPI项目的时候基本上都会用到跨域处理 Core WebAPI的项目中自带了跨域Cors的处理,不需要单独添加程序包 如图所示 修改 Configure ...

  4. ERR : undefined reference to something

    序言: define : 定义.相信你用过 #define PI 3.141592653 (千万记得别在这句代码后加分号) reference : 引用 undefined reference to ...

  5. .net core 不是开源的么 作为菜 不能贡献源码 只有 欣赏额

    step one 去download一份 与前辈在一起

  6. 用自定义变量作为动作方法参数 URL路由 精通ASP-NET-MVC-5-弗瑞曼

  7. Liunx(centos8)下的yum的基本用法和实例

    yum 命令 Yum(全称为 Yellow dog Updater, Modified)是一个在Fedora和RedHat以及CentOS中的Shell前端软件包管理器.基于RPM包管理,能够从指定的 ...

  8. Python PID

    import time class PID: """PID Controller """ def __init__(self, P=0.2, ...

  9. UML--->活动图梳理

    活动图梳理 活动图 概述 活动图是UML用于对系统的动态行为建模的另一种常用工具,它描述活动的顺序,展现从一个活动到另一个活动的控制流,常常用于描述业务过程和并行处理过程,活动图在本质上是一种流程图. ...

  10. Leetcode | 刷题日记(1)

    本文记录个人刷题记录 推荐两个刷题网站: 地址:https://leetcode.com/ 另外一个地址:http://www.lintcode.com/ 1.Write a SQL query to ...