Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6199243
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T04:09:18+00:00 2026-05-24T04:09:18+00:00

I followed the installation instructions for installing oursql on Mac OS X. Since sudo

  • 0

I followed the installation instructions for installing oursql on Mac OS X. Since

sudo pip install oursql

told me, that it couldn’t find mysql_config I (located it with locate mysql_config and) told it where to find it by

sudo MYSQL_CONFIG=/usr/local/mysql-5.5.14-osx10.6-x86_64/bin/mysql_config pip install oursql

I added the terminal output at the bottom for readability reasons. After that I fired up python in terminal (On Mac OS Lion it is python 2.7 now,…) and did

>>> import oursql

but python keeps telling me:

>>> import oursql
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: dlopen(/Library/Python/2.7/site-packages/oursql.so, 2): Library not loaded: libmysqlclient.18.dylib
  Referenced from: /Library/Python/2.7/site-packages/oursql.so
  Reason: image not found

What do I miss? Any suggestions?


Terminal Output, of pip installation:

Downloading/unpacking oursql
  Downloading oursql-0.9.2.tar.bz2 (113Kb): 113Kb downloaded
  Running setup.py egg_info for package oursql

Installing collected packages: oursql
  Running setup.py install for oursql
    skipping 'oursqlx/oursql.c' Cython extension (up-to-date)
    building 'oursql' extension
    /usr/local/mysql-5.5.14-osx10.6-x86_64/bin/mysql_config --cflags
    llvm-gcc-4.2 -fno-strict-aliasing -fno-common -dynamic -g -Os -pipe -fno-common -fno-strict-aliasing -fwrapv -mno-fused-madd -DENABLE_DTRACE -DMACOSX -DNDEBUG -Wall -Wstrict-prototypes -Wshorten-64-to-32 -DNDEBUG -g -fwrapv -Os -Wall -Wstrict-prototypes -DENABLE_DTRACE -pipe -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c oursqlx/oursql.c -o build/temp.macosx-10.7-intel-2.7/oursqlx/oursql.o -I/usr/local/mysql-5.5.14-osx10.6-x86_64/include -Os -g -fno-common -fno-strict-aliasing -arch x86_64
    oursqlx/oursql.c: In function ‘__pyx_pf_6oursql_10Connection___cinit__’:
    oursqlx/oursql.c:4630: warning: implicit conversion shortens 64-bit value into a 32-bit value
    oursqlx/oursql.c: In function ‘__pyx_pf_6oursql_10_Statement_execute’:
    oursqlx/oursql.c:10219: warning: implicit conversion shortens 64-bit value into a 32-bit value
    oursqlx/oursql.c: In function ‘__pyx_pf_6oursql_16_DBAPITypeObject___richcmp__’:
    oursqlx/oursql.c:17597: warning: implicit conversion shortens 64-bit value into a 32-bit value
    llvm-gcc-4.2 -fno-strict-aliasing -fno-common -dynamic -g -Os -pipe -fno-common -fno-strict-aliasing -fwrapv -mno-fused-madd -DENABLE_DTRACE -DMACOSX -DNDEBUG -Wall -Wstrict-prototypes -Wshorten-64-to-32 -DNDEBUG -g -fwrapv -Os -Wall -Wstrict-prototypes -DENABLE_DTRACE -pipe -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c oursqlx/compat.c -o build/temp.macosx-10.7-intel-2.7/oursqlx/compat.o -I/usr/local/mysql-5.5.14-osx10.6-x86_64/include -Os -g -fno-common -fno-strict-aliasing -arch x86_64
    /usr/local/mysql-5.5.14-osx10.6-x86_64/bin/mysql_config --libs
    llvm-gcc-4.2 -Wl,-F. -bundle -undefined dynamic_lookup -Wl,-F. -arch i386 -arch x86_64 build/temp.macosx-10.7-intel-2.7/oursqlx/oursql.o build/temp.macosx-10.7-intel-2.7/oursqlx/compat.o -o build/lib.macosx-10.7-intel-2.7/oursql.so -L/usr/local/mysql-5.5.14-osx10.6-x86_64/lib -lmysqlclient -lpthread
    ld: warning: ignoring file build/temp.macosx-10.7-intel-2.7/oursqlx/oursql.o, file was built for unsupported file format which is not the architecture being linked (i386)
    ld: warning: ignoring file build/temp.macosx-10.7-intel-2.7/oursqlx/compat.o, file was built for unsupported file format which is not the architecture being linked (i386)
    ld: warning: ignoring file /usr/local/mysql-5.5.14-osx10.6-x86_64/lib/libmysqlclient.dylib, file was built for unsupported file format which is not the architecture being linked (i386)

Successfully installed oursql
Cleaning up...
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T04:09:19+00:00Added an answer on May 24, 2026 at 4:09 am

    This did the job:

    export DYLD_LIBRARY_PATH="$DYLD_LIBRARY_PATH:/usr/local/mysql/lib/"
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've followed the instructions on http://geryit.com/blog/2011/01/installing-mysql-with-rails-on-mac-os-x-snow-leopard/ , including the installation of ruby via macport.
I have followed the installation instructions as shown here to install the FedOne server,I
I am having some issues installing my Windows Service. I followed Matt's instructions here
I have rails Rails 2.3.8 and Devise 1.0.8. I have followed the installation instructions
I've followed the instructions for installing phusion passenger with nginx in ubuntu. I had
I followed the installation of RMagick for OSX: http://rmagick.rubyforge.org/install-faq.html#osx I have done the Imagemagick
I followed the installation instructions provided by Hanselman but the only thing I can
I followed this tutorial on configuring the Rails plugin ExceptionNotifier. I know that I
I followed the Tutorial in Cocoa Programming For Mac OS X to create a
I followed the instructions found here to get my rails app to communicate with

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.