# Installing mysql with macports

**URL:** <https://www.ruby-forum.com/t/installing-mysql-with-macports/171974>\
**Category:** Rails\
**Created:** [July 12, 2009, 7:45pm UTC](https://www.ruby-forum.com/t/installing-mysql-with-macports/171974 "2009-07-12T19:45:31Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![mikej](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/a9a28c/32.png) [@mikej](https://www.ruby-forum.com/u/mikej)\
**Post date:** [July 12, 2009, 7:45pm UTC](https://www.ruby-forum.com/t/installing-mysql-with-macports/171974/1 "2009-07-12T19:45:31Z")

</div>

Not sure if this is off topic, but there doesn’t seem to be an obvious  
place to ask this question.

I am trying to use MacPorts to install mysql. I have xcode 3.0 and  
x11 XQuartz 2.1.6 installed.

$PATH:  
/opt/local/bin:/opt/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/  
local/bin:/usr/X11/bi

When I sudo port install mysql5-server

I receive:

—\> Configuring mysql5  
Error: Target org.macports.configure returned: configure failure:  
shell command " cd “/opt/local/var/macports/build/  
\_opt\_local\_var\_macports\_sources\_rsync.macports.org\_release\_ports\_databases\_mysql5/  
work/mysql-5.0.83” && ./configure --prefix=/opt/local --mandir=/opt/  
local/share/man --infodir=/opt/local/share/info --localstatedir=/opt/  
local/var/db/mysql5 --libdir=/opt/local/lib/mysql5 --bindir=/opt/local/  
lib/mysql5/bin --includedir=/opt/local/include/mysql5 --datadir=/opt/  
local/share/mysql5 --sysconfdir=/opt/local/etc/mysql5 --with-zlib-dir=/  
opt/local --with-openssl=/opt/local --with-extra-charsets=complex –  
with-federated-storage-engine --with-unix-socket-path=/opt/local/var/  
run/mysql5/mysqld.sock --with-mysqld-user=mysql --without-bench –  
enable-thread-safe-client --without-readline " returned error 77  
Command output: checking build system type… i386-apple-darwin9.7.0  
checking host system type… i386-apple-darwin9.7.0  
checking target system type… i386-apple-darwin9.7.0  
checking for a BSD-compatible install… /usr/bin/install -c  
checking whether build environment is sane… yes  
checking for a thread-safe mkdir -p… ./install-sh -c -d  
checking for gawk… no  
checking for mawk… no  
checking for nawk… no  
checking for awk… awk  
checking whether make sets $(MAKE)… yes  
checking “character sets”… default: latin1, collation:  
latin1\_swedish\_ci; compiled in: latin1 latin1 utf8 big5 cp1250 cp932  
eucjpms euckr gb2312 gbk latin1 latin2 sjis tis620 ucs2 ujis utf8  
checking whether to compile national Unicode collations… yes  
checking whether build environment is sane… yes  
checking whether make sets $(MAKE)… (cached) yes  
checking for gawk… (cached) awk  
checking for gcc… /usr/bin/gcc-4.0  
checking for C compiler default output file name…  
configure: error: in `/opt/local/var/macports/build/ _opt_local_var_macports_sources_rsync.macports.org_release_ports_databases_mysql5/ work/mysql-5.0.83': configure: error: C compiler cannot create executables See`config.log’ for more details.

Error: The following dependencies failed to build: mysql5  
Error: Status 1 encountered during processing.

In fact I get the error:

Error: Target org.macports.configure returned: configure failure

whenever I use MacPorts.

A

---

<div class="post-metadata">

**Author:** ![mikej](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/a9a28c/32.png) [@mikej](https://www.ruby-forum.com/u/mikej)\
**Post date:** [July 13, 2009, 6:55am UTC](https://www.ruby-forum.com/t/installing-mysql-with-macports/171974/2 "2009-07-13T06:55:02Z")

</div>

Hi, have you tried reinstalling xcode? Or even better, upgrade to  
latest and greatest xcode?

Cheers!  
Arzumy

---

<div class="post-metadata">

**Author:** ![mikej](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/a9a28c/32.png) [@mikej](https://www.ruby-forum.com/u/mikej)\
**Post date:** [July 13, 2009, 12:08pm UTC](https://www.ruby-forum.com/t/installing-mysql-with-macports/171974/3 "2009-07-13T12:08:10Z")

</div>

Yes, I’ve tried upgrading and reinstalling Xcode. Still the same  
problem,

Mike

---

<div class="post-metadata">

**Author:** ![mikej](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/a9a28c/32.png) [@mikej](https://www.ruby-forum.com/u/mikej)\
**Post date:** [July 13, 2009, 4:37pm UTC](https://www.ruby-forum.com/t/installing-mysql-with-macports/171974/4 "2009-07-13T16:37:02Z")

</div>

On Mon, Jul 13, 2009 at 6:07 AM, mikej[removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> Yes, I’ve tried upgrading and reinstalling Xcode. Still the same  
> problem,

Not a direct answer to your problem, but…

Until recently I was using the macports version of mysql, and was  
frustrated by things like the OS X MySql preference pane not working.

A few days ago, my buddy (who happens to be one of the sysops at  
37signals) had me install mysql using one of the binary packages  
available from the mysql site (e.g.  
[http://dev.mysql.com/doc/refman/5.0/en/mac-os-x-installation.html](http://dev.mysql.com/doc/refman/5.0/en/mac-os-x-installation.html))

After a few adjustments (e.g. the package installs under /usr/local  
instead of /opt/local) I’m liking it.

–  
Rick DeNatale

Blog: [http://talklikeaduck.denhaven2.com/](http://talklikeaduck.denhaven2.com/)  
Twitter: [http://twitter.com/RickDeNatale](http://twitter.com/RickDeNatale)  
WWR: [http://www.workingwithrails.com/person/9021-rick-denatale](http://www.workingwithrails.com/person/9021-rick-denatale)  
LinkedIn: [http://www.linkedin.com/in/rickdenatale](http://www.linkedin.com/in/rickdenatale)
