Exception: error, not support this platform, only support centos/redhat, suse, ubuntu.

解决方法:
- 查看错误信息:提示不支持我的平台,只支持centos,ubuntu,suse
- 但是我的系统就是centos7
通过查看 comm/check.py文件,发现报错代码块的具体内容如下:
def installByYum(server): if isCentos(): result = doCmdIgnoreException("sudo yum -y install {}".format(server)) if result["status"] != 0: os.system("sudo yum -y install epel-release") os.system("sudo yum -y install python-pip") os.system("pip install requests") result = doCmd("sudo yum -y install {}".format(server)) elif isSuse(): os.system("sudo zypper install -y {}".format(server)) elif isUbuntu(): os.system("sudo apt-get install -y {}".format(server)) else: raise Exception("error,not support this platform,only support centos,suse,ubuntu.") return- 我猜测,因为linux发行版不同,安装软件的方法也不同,例如:Ubuntu使用apt,centos使用yum。
- 只需把 if isCentos(): 修改为1即可
- 第五步就是自行修改了代码,因为我是centos系统,但是代码没识别出来,这样修改了以后 ,代码就会使用 yum 命令安装软件(注:如果报相同的错,请根据自己的系统修改这部分代码)
版权属于:戏人看戏博客网
本文链接:https://blog.web3er.cn/archives/1344.html
若无注明均为戏人看戏原创,转载请注明出处,感谢您的支持!
感谢分享
改为1就不会执行isCentos()这个函数了,也就默认不检查你机器的系统是什么
NBNBNB