Python MySQLdb OS X Intel Build Error / -lmysqlclient_r

Granted, its the first item in ~/doc/FAQ.txt but it took me ~30 mins to find it after numerous google searches and futzing. Hope this helps someone who goes to google looking for the build error.

Building MySQLdb: MySQL-python-1.2.2, MySQL 5.0.37, python 2.5

/usr/bin/ld: can’t locate file for: -lmysqlclient_r

From FAQ.txt:

ld: fatal: library -lmysqlclient_r: not found

mysqlclient_r is the thread-safe library. It’s not available on
all platforms, or all installations, apparently. You’ll need to
reconfigure site.cfg (in MySQLdb-1.2.1 and newer) to have
threadsafe = False.

after changing to False, build and install work fine.

Advertisements

One thought on “Python MySQLdb OS X Intel Build Error / -lmysqlclient_r

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s