2017-03-24 30 views
0

我試圖上傳我的Django項目現場,我不斷收到此錯誤:錯誤PYTHON_EGG_CACHE上載的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

這是一個權限/所有權問題。您可以使用這些命令解決這個問題:

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