解决Linux环境"gunicorn: command not found failed"问题

这个问题是周末的时候一个网友反馈的,他在CentOS环境中安装WEB环境的时候有提到报错"gunicorn: command not found failed"问题。不过这个问题我还是第一次遇到,让他截图看看到底是什么问题。

解决Linux环境"gunicorn: command not found failed"问题

详细的错误提示:

/etc/init.d/bt: line 26:   gunicorn:  command not found failed 

如果我们要快速解决这样的问题很简单,一般老蒋会直接采用更新一个其他镜像,然后yum update更新最新源,基本上问题解决。可能他这个服务器源有点问题。但是既然有这样的问题,那就解决吧。

执行命令:

find / -name gunicorn

看看系统里到底有没有gunicorn.

/usr/local/python3/bin/gunicorn
/usr/local/python3/lib/python3.8/site-packages/gunicorn

如果我们没有看到gunicorn ,可以先安装gunicorn 。

pip install gunicorn

通过全路径命令执行:/usr/local/python3/bin/gunicorn。将gunicorn所在的路径添加到PATH环境变量里: export PATH=$PATH:/usr/local/python3/bin。

本文出处:老蒋部落 » 解决Linux环境"gunicorn: command not found failed"问题 | 欢迎分享( 公众号:老蒋朋友圈 )

公众号 「老蒋朋友圈」获取站长新知 / 加QQ群 【1012423279】获取商家优惠推送