4

DTIのServersMan VPSを使用しています。
OSはCentOS6です。

PythonのWSGIミドルウェアであるuWSGIをeasy_installを使って入れようとしてますが、
うまく入りません。

コマンドは下記をしています。

#easy_install uwsgi

初めはCコンパイラが必要とのことでgccを入れましたが、
それでも大量のエラーがでてしまい、完了しません。

[thread 1][gcc -pthread] plugins/python/python_plugin.o
[thread 0][gcc -pthread] plugins/python/pyutils.o
In file included from plugins/python/python_plugin.c:1:
plugins/python/uwsgi_python.h:2:20: error: Python.h: No such file or directory
plugins/python/uwsgi_python.h:4:25: error: frameobject.h: No such file or directory
In file included from plugins/python/python_plugin.c:1:
plugins/python/uwsgi_python.h:59: error: expected ‘)’ before ‘*’ token
plugins/python/uwsgi_python.h:60: error: expected ‘)’ before ‘*’ token

(中略)

plugins/python/pyutils.c:386: error: implicit declaration of function ‘PyDict_SetItemString’
plugins/python/pyutils.c:386: error: implicit declaration of function ‘PyString_FromString’

上記のようなエラーが発生します。

pipで試しても同じ状況です。

WEBで調べて見てもみなさんシンプルにトラブル無くインストールができているようで
対策がわかりません。

よろしくお願いいたします。

1
  • uwsgiのインストールページをしっかり読んでいませんでした。 無事にインストールできました!ありがとうございます。
    – YMAC
    2015年2月2日 21:26

1 件の回答 1

2

以下のコマンドを実行してから、再度easy_installまたはpipでインストールをやってみてください。
pythonはインストール済みだと思われますので、二行目は不要だと思いますが一応。

yum groupinstall "Development Tools"
yum install python
yum install python-devel

参考: Installing uWSGI, installing-from-source — uWSGI 2.0 documentation

この質問に回答するには、ログインする必要があります。

求めていた回答ではありませんか? のタグが付いた他の質問を参照する。