Ubuntu zookeeper-3.5.0-alpha启动错误 zkEnv.sh: Syntax error: "(" unexpected (expecting "fi")(转)
昨天小猿我把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/service1/zookeeper-3.5.0-alpha/bin/zkEnv.sh: Syntax error: "(" unexpected (expecting "fi")
还以为是zookeeper的问题结果瞎忙活了半天,百度了一下才知道原来是ubuntu 设置的问题(注:有一种方法是设置zookeeper的系统环境变量,不过博主需要一台服务器安装多个zookeeper,配置环境变量还是不怎么实用,要是装10个就得分别设置10个。。)
具体结局方法如下:
执行以下命令
root@host8:/bin# ls -l /bin/sh
lrwxrwxrwx 1 root root 4 Dec 23 22:30 /bin/sh -> dash(默认)
root@host8:/bin# ln -sf bash /bin/sh
root@host8:/bin# ls -l /bin/sh
lrwxrwxrwx 1 root root 4 Dec 23 22:37 /bin/sh -> bash
重新启动zookeeper,问题得以解决...

Ubuntu zookeeper-3.5.0-alpha启动错误 zkEnv.sh: Syntax error: "(" unexpected (expecting "fi")(转)的更多相关文章
- ubuntu.sh: 113: ubuntu.sh: Syntax error: "(" unexpected
在ubuntu电脑上安装lnmp环境,执行下面命令时 sudo sh ubuntu.sh 报错误:ubuntu.sh: 113: ubuntu.sh: Syntax error: "(&qu ...
- laravel 5.5 运行在 php7.0 报错 Symfony\Component\Translation\Translator.php FatalThrowableErrorParse error: syntax error, unexpected '?', expecting variable (T_VARIABLE)
问题描述 报错原因是 php-cli 版本是 7.1.x,运行 composer create-project ... 命令时安装的依赖包会自动适配到当前 php 版本 7.1.x.如果 php-fp ...
- Ubuntu 执行脚本报错:c.sh: Syntax error: "(" unexpected
在Ubuntu下执行脚本报错 c.sh: Syntax error: "(" unexpected 解决办法 sudo dpkg-reconfigure dash ubuntu@i ...
- [Ubuntu]“ubuntu.sh: 113: ubuntu.sh:Syntax error: "(" unexpected ”报错解决方法
原因:有可能是兼容性问题 解决方法: 1.sudo dpkg-reconfigure dash 2.在弹出的窗口选择no
- 【玩转Ubuntu】08. Linux报错:Syntax error: "(" unexpected解决办法
问题: 在MAC上写了一段shell脚本,放到Ubuntu上运行总是报下面这个错误,单步调试都是对的,就是直接运行会报错. bixiaopeng@ubuntu:~/package$ sh packag ...
- openwrt-scripts/config/mconf: Syntax error: “(” unexpected错误解决
scripts/config/mconf: Syntax error: “(” unexpected错误解决 从其他地方复制而来的openwrt SDK,放在本地执行make menuconfig时出 ...
- 执行shell脚本遇到错误syntax error: unexpected "then" (expecting "}")
今天执行脚本的时候遇到错误,如下图: root@ApFree:/usr/sbin# ./conntrack_num_graph.sh ./conntrack_num_graph.sh: line : ...
- PHP关于syntax error语法错误的问题(Parse error: syntax error, unexpected end of file in xxxxxxxx)
在php程序出现类似 Parse error: syntax error, unexpected end of file in xxxxxxxx on line xx 的错误. 如图 如果发现php ...
- 不同系统执行相同shell脚本,出现Syntax error: "(" unexpected错误解决
例如shell脚本在centos系统中能正常执行,而在ubuntu系统中执行会出现类似Syntax error: "(" unexpected的错误,一般这种是因为sh与bash有 ...
随机推荐
- kettle Row Normaliser(行转列)
表1 设置 表2
- 使用repeater控件显示列表替代treeview
using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.We ...
- 注意事项: Oracle Not Exists 及 Not In 使用
select value from temp_a awhere a.id between 1 and 100and not exists(select * from temp_b b where a. ...
- 第二十四篇、iOS 10版本适配
随着iOS10发布的临近,大家的App都需要适配iOS10,下面是我总结的一些关于iOS10适配方面的问题,如果有错误,欢迎指出. 1.系统判断方法失效: 在你的项目中,当需要判断系统版本的话,不要使 ...
- UIMenuController/UIPasteboard(1) 制作一个可以粘贴复制的Label
效果如下: 苹果只放出来了 UITextView,UITextField,webView三个控件的剪贴板,所以我们要自定义可以复制粘贴的控件,首先需要打开UIResponder的两个方法: - ( ...
- Mysql的权限管理
权限管理 创建用户 语法: create user '用户名'[@'主机名'][identified by '密码']; 示例: 说明: 用户名必须使用引号 '主机名'可以是以 ...
- Codevs 3289 花匠 2013年NOIP全国联赛提高组
3289 花匠 2013年NOIP全国联赛提高组 时间限制: 1 s 空间限制: 128000 KB 题目等级 : 钻石 Diamond 题目描述 Description 花匠栋栋种了一排花,每株花都 ...
- (poj)3020 Antenna Placement 匹配
题目链接 : http://poj.org/problem?id=3020 Description The Global Aerial Research Centre has been allotte ...
- 第9条:覆盖equals时总要覆盖hashCode
在每个覆盖equals方法的类中,也必须覆盖hashCode方法.否则,会违反Object.hashCode的通用约定,从而导致该类无法结合所有基于散列的集合一起正常工作,包括HashMap,Hash ...
- php 加密解密方法2
<?php /* * @param $string 要加密或解决的字符串 * @param $operation 加密/解密 ENCODE加密, DECODE 解密 * @param $key ...