<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Unwrongest &#187; mysql</title>
	<atom:link href="http://www.unwrongest.com/tag/mysql/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.unwrongest.com</link>
	<description>Interaction Designer and Interface Developer</description>
	<lastBuildDate>Wed, 30 Jun 2010 11:24:57 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
		<item>
		<title>How to install mysql-python on Apple OS X Leopard</title>
		<link>http://www.unwrongest.com/blog/how-to-install-mysql-python-on-apple-os-x-leopard/</link>
		<comments>http://www.unwrongest.com/blog/how-to-install-mysql-python-on-apple-os-x-leopard/#comments</comments>
		<pubDate>Wed, 22 Oct 2008 21:49:58 +0000</pubDate>
		<dc:creator>Jan Jarfalk</dc:creator>
				<category><![CDATA[blog]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[python]]></category>

		<guid isPermaLink="false">http://unwr/?p=69</guid>
		<description><![CDATA[How to solve "Setup script exited with error: command 'gcc' failed with exit status 1" on a Macbook Pro running Apple OS X Leopard 10.5.5 when installing mysql-python.]]></description>
			<content:encoded><![CDATA[<p>When I tried to build and install mysql-python, on my Macbook Pro running Apple OS X Leopard 10.5.5, I encountered a few problems (<strong>Setup script exited with error: command &#8216;gcc&#8217; failed with exit status 1</strong>). But thanks to Google and the Python community, there were no problems that couldn&#8217;t be fixed.</p>
<h3>Step 1 &#8211; Download and extract mysql-python</h3>
<p>Let&#8217;s take it from the top. First you need to download mysql-python from <a href="http://sourceforge.net/projects/mysql-python">the Sourceforge project page</a> and extract the files.</p>
<h3>Step 2 &#8211; Locate and edit _mysql.c</h3>
<p>Locate the <strong>_mysql.c</strong> file in your mysql-python directory, open it up and remove the following three rows around row 35.</p>
<pre class="brush:js">
#ifndef uint
#define uint unsigned int
#endif
</pre>
<p>Still in <strong>_mysql.c</strong>, you should change the following two rows around row 480.</p>
<pre class="brush:js">
uint port = MYSQL_PORT;
uint client_flag = 0;
</pre>
<p>Change those two rows to:</p>
<pre class="brush:js">
unsigned int port = MYSQL_PORT;
unsigned int client_flag = 0;
</pre>
<h3>Step 3 &#8211;  Fix the mysql_config location (not always necessary)</h3>
<p>You might need to open up the site.cfg file in your mysql-python directory and change the path to your mysql_config.</p>
<pre class="brush:js">
#mysql_config = /path to your mysql_config
</pre>
<h3>Step 4 &#8211; Open up your terminal</h3>
<p>You will need to create a symbolic link between /usr/local/mysql/lib and /usr/local/mysql/lib/mysql. Open up your terminal and do the following.</p>
<pre class="brush:js">
$ sudo ln -s /usr/local/mysql/lib /usr/local/mysql/lib/mysql
</pre>
<h3>Step 4 &#8211; Rebuild and install</h3>
<p>All done! You should be able to build and install mysql-python now. With your terminal in the mysql-python directory you should do the following.</p>
<pre class="brush:js">
$ sudo python setup.py build
$ sudo python setup.py install
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.unwrongest.com/blog/how-to-install-mysql-python-on-apple-os-x-leopard/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
