I'm using a Mac 10.6.6, with MAMP installed. I am trying to get Ruby working. There is a problem with the headers, so I was referred to this tutorial. http://blog.mirotin.net/?p=35
I have MySQL 5.5. installed on my computer
When I type in the 5th line below $ sudo port install cmake
, it says
sudo: port: command not found
Do you know what I can do about this?
$ cd /tmp
$ mv /Users/yourname/Desktop/mysql-5.5.9.tar.gz .
$ tar xf mysql-5.5.9.tar.gz
$ cd mysql-5.5.9
$ sudo port install cmake
$ cmake . -DMYSQL_UNIX_ADDR=/Applications/MAMP/tmp/mysql/mysql.sock -DCMAKE_INSTALL_PREFIX=/Applications/MAMP/Library
$ make -j 3
$ cp libmysql/*.dylib /Applications/MAMP/Library/lib/
$ mkdir -p /Applications/MAMP/Library/include/mysql
$ cp include/* /Applications/MAMP/Library/include/mysql
$ sudo env ARCHFLAGS="-arch x86_64" gem install mysql2 -- --with-mysql-config=/Applications/MAMP/Library/bin/mysql_config
$ sudo install_name_tool -change /tmp/mysql-5.5.9/libmysql/libmysqlclient.16.dylib /Applications/MAMP/Library/lib/libmysqlclient.16.dylib /opt/local/lib/ruby/gems/1.8/gems/mysql2-0.2.6/lib/mysql2/mysql2.bundle
$ rm -rf /tmp/mysql-5.5.9 /tmp/mysql-5.5.9.tar.gz
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…