-bash-3.2$ dir
dispatch.cgi stats
-bash-3.2$ ./dispatch.cgi
': [Errno 2] No such file or directoryile '
这是dispatch.cgi
:
#!/usr/local/bin/python2.7
import sys, os
sys.path += ['/home/content/88/10907688/lib/venv/lib/python2.7/site-packages']
sys.path += ['/home/content/88/10907688/lib/venv/bin/gccFishing']
os.environ['DJANGO_SETTINGS_MODULE'] = 'gccFishing.settings'
from flup.server.fcgi import WSGIServer
from django.core.handlers.wsgi import WSGIHandler
WSGIServer(WSGIHandler()).run()
为什么dispatch.cgi没有被执行?
最佳答案
尝试给予脚本适当的权限
chmod +x dispatch.cgi
并确保您的 python 路径正确
which python2.7
关于python - ': [Errno 2] No such file or directoryile ' in Linux,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17721487/