大蛇的蛋

FastCGI模式使用spawn-fcgi运行python脚本,pycurl调用时捕获了如下异常:

 

ExtractionError: Can't extract file(s) to egg cache

 

The following error occurred while trying to extract file(s) to the

Python egg cache:

 

[Errno 13] Permission denied: '/root/.python-eggs'

 

The Python egg cache directory is currently set to:

 

 /root/.python-eggs

 

Perhaps your account does not have write access to this directory?

You can change the cache directory by setting the PYTHON_EGG_CACHE

environment variable to point to an accessible directory.

 

错误信息较详细,不做解释了,直接上解决办法。

尝试了网上的一些方法,最终最靠谱的还是:解压python库中的egg文件!

 

1、进入site-packages目录。(找不到?whereis python一下,在lib里)

2、把需要的egg解压成目录。(以我的 pycurl-7.19.0-py2.6-linux-i686.egg 为例)

 

mkdir tmp

unzip pycurl-7.19.0-py2.6-linux-i686.egg -d tmp

rm -f pycurl-7.19.0-py2.6-linux-i686.egg

mv tmp pycurl-7.19.0-py2.6-linux-i686.egg

 

欧了,蛇蛋已煎好,慢慢享用吧:)

 

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值