sudo:port:找不到使用MySQL MAMP设置Ruby的命令 [英] sudo: port: command not found setting up Ruby with MySQL MAMP
问题描述
我正在使用安装了MAMP的Mac 10.6.6.我正在尝试让Ruby工作.标头存在问题,因此我被本教程引荐. http://blog.mirotin.net/?p=35
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
我有MySQL 5.5.安装在我的计算机上
I have MySQL 5.5. installed on my computer
当我在$ sudo port install cmake
下的第五行输入内容时,它会显示
When I type in the 5th line below $ sudo port install cmake
, it says
sudo: port: command not found
你知道我能做什么吗?
$ 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
推荐答案
如果将帖子保留在同一线程中,那就更好了.因此,从一开始就阅读问题,我们可以为您提供更轻松的帮助.
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是一个OS X软件包管理器,称为MacPorts.因此,要使其正常工作,必须首先从 http://www.macports.org/安装MacPorts.
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/.
这篇关于sudo:port:找不到使用MySQL MAMP设置Ruby的命令的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!