DEAD MAN CODING

FOOOLING.COM

一个因为没看清楚mysql版本引起的xx

Oct. 18, 2014, 12:50 p.m.

升级10.10后,重装了homebrew,死活装不上MySQL-python这个包

总是提示


fooling@fooling-2:~$ easy_install MySQL-python

Finished processing dependencies for MySQL-python
fooling@fooling-2:~$ python
Python 2.7.8 (default, Oct 19 2014, 11:46:44) 
[GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.51)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import MySQLdb
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "build/bdist.macosx-10.10-x86_64/egg/MySQLdb/__init__.py", line 19, in <module>
  File "build/bdist.macosx-10.10-x86_64/egg/_mysql.py", line 7, in <module>
  File "build/bdist.macosx-10.10-x86_64/egg/_mysql.py", line 6, in __bootstrap__
ImportError: dlopen(/Users/fooling/.python-eggs/MySQL_python-1.2.5-py2.7-macosx-10.10-x86_64.egg-tmp/_mysql.so, 2): no suitable image found.  Did find:
    /Users/fooling/.python-eggs/MySQL_python-1.2.5-py2.7-macosx-10.10-x86_64.egg-tmp/_mysql.so: mach-o, but wrong architecture


一直以为是pip的问题

修改了一大堆配置

发现pip安装过程中指定arch为i386,改不动。

进入mysql查看下版本


fooling@fooling-2:~/Test$ mysql
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 40
Server version: 5.6.7-rc MySQL Community Server (GPL)

Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> SHOW VARIABLES LIKE "%version%";
+-------------------------+------------------------------+
| Variable_name           | Value                        |
+-------------------------+------------------------------+
| innodb_version          | 1.2.7                        |
| protocol_version        | 10                           |
| slave_type_conversions  |                              |
| version                 | 5.6.7-rc                     |
| version_comment         | MySQL Community Server (GPL) |
| version_compile_machine | i386                         |
| version_compile_os      | osx10.7                      |
+-------------------------+------------------------------+
7 rows in set (0.01 sec)



原来真的是i386
我了个去, 1个小时过去了


友情链接