sudo minikube返回“找不到命令”


1

我需要在Centos 7.5上将minikube作为sudo运行。minikube在/ usr / local / bin中

对于我的用户,$ PATH是:

/usr/local/maven/bin:/usr/lib64/qt-3.3/bin:/usr/local/maven/bin:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/bin:/sbin

对于用户root echo $ PATH为:

/usr/local/bin/:/usr/lib64/qt-3.3/bin:/usr/local/maven/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin

我什至在visudo中添加了以下内容

Defaults    secure_path = /sbin:/bin:/usr/sbin:/usr/bin:/usr/local/bin

但是...

sudo minikube start --cpus 4 --memory 24000 --disk-size=50g --kubernetes-version=v1.7.4 --vm-driver=none

返回sudo:minikube:找不到命令

出什么问题了,还是缺少了什么?


您解决了这个问题吗?面临同样的问题。
iCrus

Answers:


1

看到这个问题的答案:https : //github.com/kubernetes/minikube/issues/1932

问题是因为您的minikube已安装到/usr/bin/localsudo中,但看不到二进制文件。一个简单的解决方法是:

$ sudo mv /usr/bin/local/minikube /usr/bin/


1
面对同样的问题,但我的目录是/ usr / local / bin / *而不是/ usr / bin / local / *
Vaibhav Singh

当我这样做时:sudo mv / usr / local / bin / minikube / usr / bin /我在mv下看到错误:将/ usr / local / bin / minikube重命名为/ usr / bin / minikube:不允许操作
smiley
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.