chsh,修改系统默认shell为zsh之后,执行greenplum的命令会出现如下:
[FATAL]:-Scripts must be run by a user account that has SHELL=/bin/bash
[INFO]:-/bin/bash exists, please update user account shell
的错误提示,你说我该咋办呢,这种情况在postgresql都没有出现过。真是奇怪了,求大牛来解答一下,谢谢了!
我发现一个好的解决办法,不知道有什么潜在的危险,首先gp给出了gp用到的命令有python写的,有perl写的,还有一部分是bash写的
如下:
List of Management Scripts Written in Bash
------------------------------------------
bin/gpcheckos.bash - Like gpcheckos, but in bash
bin/gpcrondump - Dumps a database
bin/gpdbrestore - Restores a database dumped from gpcrondump
bin/gpinitsystem - Creates a new Greenplum Database
bin/gpload - Sets env variables and calls gpload.py
bin/gpprintdbsizes - Removed in 4.0
bin/gprebuildsystem - Deprecated in 3.4
通过以上命令提供的线索找到bin目录下的lib目录下的gp_bash_functions.sh,注释一下代码即可
# Location Functions
#******************************************************************************
#Check that SHELL is /bin/bash
# if [ $SHELL != /bin/bash ] && [ `ls -al /bin/sh|grep -c bash` -ne 1 ];then
# echo "[FATAL]:-Scripts must be run by a user account that has SHELL=/bin/bash"
# if [ -f /bin/bash ];then
# echo "[INFO]:-/bin/bash exists, please update user account shell"
# else
# echo "[WARN]:-/bin/bash does not exist, does bash need to be installed?"
# fi
# exit 2
# fi
gp有大量的管理脚本是bash的,你最好还是用bash来管理GP,或者修改一下已有的管理脚本,改成zsh兼容的。
版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。