devstack安装过程中出现syntax error

在CentOS上安装devstack的时候遇到:

[stack@localhost ~]$ ./stack.sh 
sudo: >>> /etc/sudoers.d/50_stack_sh: syntax error near line 1 <<<
sudo: >>> /etc/sudoers.d/50_stack_sh: syntax error near line 2 <<<
sudo: parse error in /etc/sudoers.d/50_stack_sh near line 1
sudo: no valid sudoers sources found, quitting
sudo: unable to initialize policy plugin
sudo: >>> /etc/sudoers.d/50_stack_sh: syntax error near line 1 <<<
sudo: >>> /etc/sudoers.d/50_stack_sh: syntax error near line 2 <<<
sudo: parse error in /etc/sudoers.d/50_stack_sh near line 1
sudo: no valid sudoers sources found, quitting
sudo: unable to initialize policy plugin
sudo: >>> /etc/sudoers.d/50_stack_sh: syntax error near line 1 <<<
sudo: >>> /etc/sudoers.d/50_stack_sh: syntax error near line 2 <<<
sudo: parse error in /etc/sudoers.d/50_stack_sh near line 1
sudo: no valid sudoers sources found, quitting
sudo: unable to initialize policy plugin
sudo: >>> /etc/sudoers.d/50_stack_sh: syntax error near line 1 <<<
sudo: >>> /etc/sudoers.d/50_stack_sh: syntax error near line 2 <<<
sudo: parse error in /etc/sudoers.d/50_stack_sh near line 1
sudo: no valid sudoers sources found, quitting
sudo: unable to initialize policy plugin
sudo: >>> /etc/sudoers.d/50_stack_sh: syntax error near line 1 <<<
sudo: >>> /etc/sudoers.d/50_stack_sh: syntax error near line 2 <<<
sudo: parse error in /etc/sudoers.d/50_stack_sh near line 1
sudo: no valid sudoers sources found, quitting
sudo: unable to initialize policy plugin
RDO repo not detected; installing
++ proxychains /usr/bin/yum.bin install http://rdo.fedorapeople.org/openstack-havana/rdo-release-havana.rpm
ProxyChains-3.1 (http://proxychains.sf.net)
Loaded plugins: fastestmirror
You need to be root to perform this command.
[Call Trace]
./stack.sh:224:die
[ERROR] ./stack.sh:224 Error installing RDO repo, cannot continue

切换到 root 用户,
会看到有这么一个文件 /etc/sudoers.d/50_stack_sh

[root@localhost stack]# cat /etc/sudoers.d/50_stack_sh
 ALL=(root) NOPASSWD:ALL
Defaults: secure_path=/sbin:/usr/sbin:/usr/bin:/bin:/usr/local/sbin:/usr/local/bin

这个文件是在安装devstack之前,创建调用下面命令创建stack用户时生成的:

./tools/create-stack-user.sh

只需把这个文件改一下即可,

stack ALL=(ALL) NOPASSWD: ALL
Defaults secure_path=/sbin:/usr/sbin:/usr/bin:/bin:/usr/local/sbin:/usr/local/bin
Defaults !requiretty
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值