Menu

Error mysqldb 1.2.3c1 on Mac 10.5.8 Leopard

Help
Anonymous
2010-02-08
2012-09-19
  • Anonymous

    Anonymous - 2010-02-08

    Hi,

    I'm trying to install mysqldb 1.2.3c1 on my Mac OSX 10.5.8 Leopard so I can
    use MySQL with Django.

    I have MAMP installed on my mac, is it possible to use this version of MySQL
    with MySQLdb?

    Or do I have to install MySQL separately for this module to work?

    I tried

    python setup.py build
    

    and I got the following error:

    running build
    running build_py
    copying MySQLdb/release.py -> build/lib.macosx-10.5-i386-2.5/MySQLdb
    running build_ext
    building '_mysql' extension
    gcc -Wl,-F. -bundle -undefined dynamic_lookup -arch i386 -arch ppc build/temp.macosx-10.5-i386-2.5/_mysql.o -L/Applications/MAMP/Library/lib/mysql -lmysqlclient_r -lz -lm -o build/lib.macosx-10.5-i386-2.5/_mysql.so
    ld: library not found for -lmysqlclient_r
    collect2: ld returned 1 exit status
    ld: library not found for -lmysqlclient_r
    collect2: ld returned 1 exit status
    lipo: can't open input file: /var/folders/sE/sEdFajpBFXergJVaiXZyfU+++TI/-Tmp-//ccCcrywu.out (No such file or directory)
    error: command 'gcc' failed with exit status 1
    

    What am I doing wrong and how can I fix it?

    Thanks in advance.

     
  • Anonymous

    Anonymous - 2010-02-08

    Update:

    I did the following:

    rm -r build
    python setup.py clean
    

    and re-build, got a little further but still the same damned -lmysqlclient_r
    error:

    running build
    running build_py
    creating build
    creating build/lib.macosx-10.5-i386-2.5
    copying _mysql_exceptions.py -> build/lib.macosx-10.5-i386-2.5
    creating build/lib.macosx-10.5-i386-2.5/MySQLdb
    copying MySQLdb/__init__.py -> build/lib.macosx-10.5-i386-2.5/MySQLdb
    copying MySQLdb/converters.py -> build/lib.macosx-10.5-i386-2.5/MySQLdb
    copying MySQLdb/connections.py -> build/lib.macosx-10.5-i386-2.5/MySQLdb
    copying MySQLdb/cursors.py -> build/lib.macosx-10.5-i386-2.5/MySQLdb
    copying MySQLdb/release.py -> build/lib.macosx-10.5-i386-2.5/MySQLdb
    copying MySQLdb/times.py -> build/lib.macosx-10.5-i386-2.5/MySQLdb
    creating build/lib.macosx-10.5-i386-2.5/MySQLdb/constants
    copying MySQLdb/constants/__init__.py -> build/lib.macosx-10.5-i386-2.5/MySQLdb/constants
    copying MySQLdb/constants/CR.py -> build/lib.macosx-10.5-i386-2.5/MySQLdb/constants
    copying MySQLdb/constants/FIELD_TYPE.py -> build/lib.macosx-10.5-i386-2.5/MySQLdb/constants
    copying MySQLdb/constants/ER.py -> build/lib.macosx-10.5-i386-2.5/MySQLdb/constants
    copying MySQLdb/constants/FLAG.py -> build/lib.macosx-10.5-i386-2.5/MySQLdb/constants
    copying MySQLdb/constants/REFRESH.py -> build/lib.macosx-10.5-i386-2.5/MySQLdb/constants
    copying MySQLdb/constants/CLIENT.py -> build/lib.macosx-10.5-i386-2.5/MySQLdb/constants
    running build_ext
    building '_mysql' extension
    creating build/temp.macosx-10.5-i386-2.5
    gcc -fno-strict-aliasing -Wno-long-double -no-cpp-precomp -mno-fused-madd -fno-common -dynamic -DNDEBUG -g -Os -Wall -Wstrict-prototypes -DMACOSX -I/usr/include/ffi -DENABLE_DTRACE -arch i386 -arch ppc -pipe -Dversion_info=(1,2,3,'gamma',1) -D__version__=1.2.3c1 -I/Applications/MAMP/Library/include/mysql -I/System/Library/Frameworks/Python.framework/Versions/2.5/include/python2.5 -c _mysql.c -o build/temp.macosx-10.5-i386-2.5/_mysql.o -fno-omit-frame-pointer -D_P1003_1B_VISIBLE -DSIGNAL_WITH_VIO_CLOSE -DSIGNALS_DONT_BREAK_READ -DIGNORE_SIGHUP_SIGQUIT -DDONT_DECLARE_CXA_PURE_VIRTUAL
    gcc -Wl,-F. -bundle -undefined dynamic_lookup -arch i386 -arch ppc build/temp.macosx-10.5-i386-2.5/_mysql.o -L/Applications/MAMP/Library/lib/mysql -lmysqlclient_r -lz -lm -o build/lib.macosx-10.5-i386-2.5/_mysql.so
    ld: library not found for -lmysqlclient_r
    collect2: ld returned 1 exit status
    ld: library not found for -lmysqlclient_r
    collect2: ld returned 1 exit status
    lipo: can't open input file: /var/folders/sE/sEdFajpBFXergJVaiXZyfU+++TI/-Tmp-//ccS9WhSa.out (No such file or directory)
    error: command 'gcc' failed with exit status 1
    

    Any ideas anyone?

     
  • Anonymous

    Anonymous - 2010-04-26

    are you using sudo?

    It looks like it can't write files to /var/folders which makes me think
    permissions for the user

    Steve

     
  • Jeremy

    Jeremy - 2011-01-28

    Monchi,

    Did you find a solution for this? I am having the sam exact problem. I've
    tried everything I have seen out there. And yes, I am using sudo.

    Thanks,

    Jeremy

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.