我正在尝试上传我的django项目,我不断收到此错误:
pkg_resources.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: '/opt/bitnami/.tmp/simplejson-2.0.9-py2.7-linux-x86_64.egg-tmp/simplejson/tmpuYcIYB.$extract'
The Python egg cache directory is currently set to:
/opt/bitnami/.tmp
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.
答案 0 :(得分:0)
这是权限/所有权问题。您可以使用以下命令解决它:
sudo su bitnami
sudo find /opt/bitnami/apps/django/ -type d -exec chmod 755 {} \;
sudo find /opt/bitnami/apps/django/ -type f -exec chmod 644 {} \;
sudo chown -R bitnami:daemon /opt/bitnami/apps/django/
您还必须将项目部署到以下路径:/opt/bitnami/apps/django/django_projects/YOURPROJECT