开发者

sudo: port: command not found setting up Ruby with MySQL MAMP

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/lib开发者_Go百科mysqlclient.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


It would me much better if you keep the posts in the same thread. Therefore we can help you more easily by reading the problem from the start.

port is an OS X package manager known is MacPorts. Therefore to get it to work you must first install MacPorts from http://www.macports.org/.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜