':[Errno 2] Linux中没有这样的文件或目录

时间:2013-07-18 10:53:32

标签: python linux apache

-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没有被执行?

1 个答案:

答案 0 :(得分:1)

尝试为脚本提供适当的权限

chmod +x dispatch.cgi

并确保您的python路径正确

which python2.7