MySQLdb and agrep in OS/X 10.10 (Yosemite)

3 replies [Last post]
wjmatthaeus
User offline. Last seen 3 years 4 weeks ago. Offline
Joined: 04/13/2015

A couple of colleagues and I are working through this most excellent text.
We ran into a couple of problems with the Python connector to MySQL, and then with agrep.

We were able to install MySQLdb using pip and a couple of tweaks.
http://stackoverflow.com/questions/25794121/cant-install-python-mysql-on...
It has seemed to work with not problems. We didn't all use the added link. It actually seemed not to matter.

We were not able to install agrep on 10.10 or on 10.9. (Tried the updated Makefile for 10.8)
Have been unable to find a fix.
Any advice?

Thanks. Will

pcfb
User offline. Last seen 4 days 22 hours ago. Offline
Joined: 08/04/2010
MySQL and making agrep

Hi Will:

Thanks for the nice words about the book.

Regarding MySQL, in your troubleshooting you used this answer to that question?
http://stackoverflow.com/a/27439907/1681480
Just want to clarify which of those answers solved the problem.

Regarding agrep, I just compiled it with 10.10, so not sure where the difference lies. Maybe instead of doing make -f try editing the original Makefile to make that CFAGS line read this:
CFLAGS = -O -Wno-return-type

What error did you get? There are a lot of warnings thrown, but in the end your folder should have one more file in it, called simply agrep... You can run this typing ./agrep or move it to another folder that is in your path.

wjmatthaeus
User offline. Last seen 3 years 4 weeks ago. Offline
Joined: 04/13/2015
yes:$ xcode-select

yes:

$ xcode-select --install
$ sudo pip install MySQL-python

I also used the following before checking if I needed to.

$ sudo ln -s /usr/local/mysql/lib/libmysqlclient.18.dylib /usr/lib/

Both seem to result in working MySQLdb modules.

I tried ./agrep and it worked!
Thanks for your help!

pcfb
User offline. Last seen 4 days 22 hours ago. Offline
Joined: 08/04/2010
MySQLdb and agrep

Thanks for the helpful feedback, Will. That will help others down the line.