我試圖按照http://uwsgi-docs.readthedocs.org/en/latest/tutorials/Django_and_nginx.html的教程進行操作。我已經完成了一切工作,以便進入http://uwsgi-docs.readthedocs.org/en/latest/tutorials/Django_and_nginx.html#install-uwsgi-system-wide。我與在Amazon EC2上使用Ubuntu 14.4實例工作:在/ tmp/pip_build_root/uwsgi中編譯失敗,顯示錯誤代碼1
沒有進入我的virtualenv,我跑:
sudo pip install uwsgi
這導致:
----------------------------------------
Cleaning up...
Command /usr/bin/python -c "import setuptools, tokenize;__file__='/tmp/pip_build_root/uwsgi/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-64P2dl-record/install-record.txt --single-version-externally-managed --compile failed with error code 1 in /tmp/pip_build_root/uwsgi
Storing debug log for failure in /home/ubuntu/.pip/pip.log
日誌有:
Cleaning up...
Removing temporary dir /tmp/pip_build_ubuntu...
Command /usr/bin/python -c "import setuptools, tokenize;__file__='/tmp/pip-uLEPHb-build/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-hPh8D0-record/install-record.txt --single-version-externally-managed --compile failed with error code 1 in /tmp/pip-uLEPHb-build
Exception information:
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/pip/basecommand.py", line 122, in main
status = self.run(options, args)
File "/usr/lib/python2.7/dist-packages/pip/commands/install.py", line 283, in run
requirement_set.install(install_options, global_options, root=options.root_path)
File "/usr/lib/python2.7/dist-packages/pip/req.py", line 1435, in install
requirement.install(install_options, global_options, *args, **kwargs)
File "/usr/lib/python2.7/dist-packages/pip/req.py", line 706, in install
cwd=self.source_dir, filter_stdout=self._filter_install, show_stdout=False)
File "/usr/lib/python2.7/dist-packages/pip/util.py", line 697, in call_subprocess
% (command_desc, proc.returncode, cwd))
InstallationError: Command /usr/bin/python -c "import setuptools, tokenize;__file__='/tmp/pip-uLEPHb-build/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-hPh8D0-record/install-record.txt --single-version-externally-managed --compile failed with error code 1 in /tmp/pip-uLEPHb-build
我在做什麼錯?
如果pip能夠正常工作,請嘗試安裝別的設備。然後(你應該已經做到了)嘗試爲uwsgi安裝一些依賴項(但我想你已經做到了)。 'apt-get install build-essential python'或'apt-get install python-dev'。如果它仍然會拋出InstallationError,那麼您可能需要找到另一種方法來安裝uwsgi。或者等到有人更有能力回答你的問題。 – Lucas03
感謝您期待它,但迄今爲止沒有運氣。 – user61629
對於我嘗試使用pip進行安裝的所有內容,我都遇到了同樣的錯誤,而且我最近更改了/ tmp /文件夾的權限。我很確定這與它有關,儘管我不確定爲什麼/如何解決它。 –