O pip install MySQL-python falha no ubuntu 14.04, erro: o comando 'x86_64-linux-gnu-gcc' falhou com o status de saída 1

Eu li todas as recomendações de excesso de pilha / google das listas de pacotes a serem instaladas e nenhuma delas parece ter resolvido isso.

Migrando um servidor da web do ubuntu 14.04 de um provedor de hospedagem dos EUA para o DigitalOcean na Europa, ambos são configurados com o mesmo manual Ansible, mas deve haver algo pré-instalado na instância nos EUA como o MySQL-python == 1.2.5.

apt-get build-essential python-dev python-pip libssl-dev libmariadbclient-dev
pip install MySQL-python

Quando mudei para a 14.04, tive problemas ao instalar o MySQL-python porque o libssl-dev precisa estar presente. Isso parece ser outra coisa.

In file included from _mysql.c:44:0:
    /usr/include/mysql/my_config.h:654:2: error: #error <my_config.h> MUST be included first!
     #error <my_config.h> MUST be included first!
      ^
    error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
    Complete output from command /usr/bin/python -c "import setuptools, tokenize;__file__='/tmp/pip_build_root/MySQL-python/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-5u4s0f-record/install-record.txt --single-version-externally-managed --compile:
    running install

running build

running build_py

creating build

creating build/lib.linux-x86_64-2.7

copying _mysql_exceptions.py -> build/lib.linux-x86_64-2.7

creating build/lib.linux-x86_64-2.7/MySQLdb

copying MySQLdb/__init__.py -> build/lib.linux-x86_64-2.7/MySQLdb

copying MySQLdb/converters.py -> build/lib.linux-x86_64-2.7/MySQLdb

copying MySQLdb/connections.py -> build/lib.linux-x86_64-2.7/MySQLdb

copying MySQLdb/cursors.py -> build/lib.linux-x86_64-2.7/MySQLdb

copying MySQLdb/release.py -> build/lib.linux-x86_64-2.7/MySQLdb

copying MySQLdb/times.py -> build/lib.linux-x86_64-2.7/MySQLdb

creating build/lib.linux-x86_64-2.7/MySQLdb/constants

copying MySQLdb/constants/__init__.py -> build/lib.linux-x86_64-2.7/MySQLdb/constants

copying MySQLdb/constants/CR.py -> build/lib.linux-x86_64-2.7/MySQLdb/constants

copying MySQLdb/constants/FIELD_TYPE.py -> build/lib.linux-x86_64-2.7/MySQLdb/constants

copying MySQLdb/constants/ER.py -> build/lib.linux-x86_64-2.7/MySQLdb/constants

copying MySQLdb/constants/FLAG.py -> build/lib.linux-x86_64-2.7/MySQLdb/constants

copying MySQLdb/constants/REFRESH.py -> build/lib.linux-x86_64-2.7/MySQLdb/constants

copying MySQLdb/constants/CLIENT.py -> build/lib.linux-x86_64-2.7/MySQLdb/constants

running build_ext

building '_mysql' extension

creating build/temp.linux-x86_64-2.7

x86_64-linux-gnu-gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -Dversion_info=(1,2,5,'final',1) -D__version__=1.2.5 -I/usr/include/mysql -I/usr/include/python2.7 -c _mysql.c -o build/temp.linux-x86_64-2.7/_mysql.o -DBIG_JOINS=1 -fno-strict-aliasing -g -static-libgcc -fno-omit-frame-pointer -fno-strict-aliasing

In file included from _mysql.c:44:0:

/usr/include/mysql/my_config.h:439:0: warning: "HAVE_WCSCOLL" redefined [enabled by default]

 #define HAVE_WCSCOLL

 ^

In file included from /usr/include/python2.7/pyconfig.h:3:0,

                 from /usr/include/python2.7/Python.h:8,

                 from _mysql.c:29:

/usr/include/x86_64-linux-gnu/python2.7/pyconfig.h:911:0: note: this is the location of the previous definition

 #define HAVE_WCSCOLL 1

 ^

In file included from _mysql.c:44:0:

/usr/include/mysql/my_config.h:654:2: error: #error <my_config.h> MUST be included first!

 #error <my_config.h> MUST be included first!

  ^

error: command 'x86_64-linux-gnu-gcc' failed with exit status 1

----------------------------------------
Cleaning up...
Command /usr/bin/python -c "import setuptools, tokenize;__file__='/tmp/pip_build_root/MySQL-python/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-5u4s0f-record/install-record.txt --single-version-externally-managed --compile failed with error code 1 in /tmp/pip_build_root/MySQL-python
Storing debug log for failure in /root/.pip/pip.log

questionAnswers(1)

yourAnswerToTheQuestion