ec2 で mysql (5.1 以降)、python (2.6 以降)、および mysqldb python モジュールを使用して Linux ami をセットアップしようとしています。ゼロから始めるか、私が始めた問題を解決するかの 2 つのオプションがあります。
ゼロから始めるのが最も簡単な場合、この構成を実行するための ami と関連コマンドを提案できますか?
これが私が試したことです。この ami から始めました: LAMP_Rails_Python_plus_goodies (ami-5db76434)。それは私にmysqlとpythonを与えます。私は mysqldb モジュールを持っていますが、それには python-devel パッケージが必要だと思います。私はそれを次のようにインストールしようとします:
yum インストール python-devel
その結果、次のようになります。
Transaction Check Error:
file /etc/rpm/macros.python from install of python-1:2.6-2.22.amzn1.noarch conflicts with file from package system-release-2011.09-2.3.noarch
それが私が立ち往生するところです。その対立を解決する方法がわかりません。mysqldb モジュール (python setup.py build) をビルドすると、次のようになります。
In file included from _mysql.c:29:
pymemcompat.h:10:20: error: Python.h: No such file or directory
_mysql.c:30:26: error: structmember.h: No such file or directory
_mysql.c:36:23: error: my_config.h: No such file or directory
_mysql.c:38:19: error: mysql.h: No such file or directory
_mysql.c:39:26: error: mysqld_error.h: No such file or directory
_mysql.c:40:20: error: errmsg.h: No such file or directory
_mysql.c:62: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
グーグルで調べると、python-devel をインストールする必要があると思われます。別の ami を使用する必要があるかもしれませんが、現時点では推測ゲームをしているように感じます。助けてくれてありがとう。