nginx+uwsgi+django报错:[Errno 13] Permission denied: ‘/root/.python-eggs’
来源:互联网 发布:美国爆炸氢弹数据多少 编辑:程序博客网 时间:2024/04/28 13:50
ExtractionError: Can't extract file(s) to egg cache The following error occurred while trying to extract file(s) to the Python eggcache: [Errno 13] Permission denied: '/root/.python-eggs'
实际上也就是:安装的MySQL_python-1.2.3c1-py2.6-linux-x86_64.egg需要解压到/root/.python-eggs目录,而Apache访问的用户并没有该目录的write权限。
一个fix方法是在修改你的django.wsgi文件,添加PYTHON_EGG_CACHE的设置,先
mkdir /tmp/.python-eggs
uwsgi.py 加上:
if sys.platform <> "win32": os.environ['PYTHON_EGG_CACHE'] = '/tmp/.python-eggs'
另一个简单的fix的方法就是将MySQL解压成目录结构:
$ cd /usr/lib/python2.6/site-packages/ (or wherever your site-packages are)$ file MySQL_python-1.2.3c1-py2.6-linux-x86_64.egg$ unzip -t MySQL_python-1.2.3c1-py2.6-linux-x86_64.egg$ mv MySQL_python-1.2.3c1-py2.6-linux-x86_64.egg foo.zip$ mkdir MySQL_python-1.2.3c1-py2.6-linux-x86_64.egg$ cd MySQL_python-1.2.3c1-py2.6-linux-x86_64.egg/$ unzip ../foo.zip$ rm ../foo.zip
- nginx+uwsgi+django报错:[Errno 13] Permission denied: ‘/root/.python-eggs’
- nginx+uwsgi+django报错:[Errno 13] Permission denied: ‘/root/.python-eggs’
- 装完 mysql-python 报错 [Errno 13] Permission denied: '/root/.python-eggs'
- ExtractionError: Can’t extract file(s) to egg cache, [Errno 13] Permission denied: ‘/root/.python-eggs’
- Django报错,IOError: [Errno 13]Permission denied
- python freeline.py 报错 IOError: [Errno 13] Permission denied
- Permission denied: ... .python-eggs
- Nginx Permission denied (errno=13) 解决办法
- 解决 “python [Errno 13] Permission denied”
- 解决 “python [Errno 13] Permission denied”
- Nginx报错403 forbidden (13: Permission denied)的解决办法
- Nginx报错403 forbidden (13: Permission denied)的解决办法
- Nginx报错403 forbidden (13: Permission denied)的解决办法
- Nginx报错403 forbidden (13: Permission denied)的解决办法
- nginx报403错误(13:Permission denied)
- [Errno 13] Permission denied处理
- IOError: [Errno 13] Permission denied
- 安装python包时出现IOError: [Errno 13] Permission denied
- 冯诺依曼运行原理
- Class.getResource用法
- UML对象图和类图关系解析
- 客制化设置Android Lanucher
- 高尔夫项目展示
- nginx+uwsgi+django报错:[Errno 13] Permission denied: ‘/root/.python-eggs’
- gdb多线程调试
- C语言中time函数【转载】
- android 实现主线程、子线程双向通信
- PHP缓存实现
- 结婚17年 老公外面一直有情人
- 正则表达式
- Android源码分析系列-整理篇
- Hadamard and Kronecker product