sudo:端口:找不到命令使用 MySQL MAMP 设置 Ruby

发布于 2024-11-02 08:14:50 字数 1160 浏览 2 评论 0原文

我使用的是 Mac 10.6.6,安装了 MAMP。我正在努力让 Ruby 工作。标题有问题,所以我参考了本教程。 http://blog.mirotin.net/?p=35

我有 MySQL 5.5。安装在我的计算机

上当我在下面的第 5 行输入 $ sudo port install cmake 时,它会显示“

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

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

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

划一舟意中人 2024-11-09 08:14:50

如果您将帖子保留在同一个线程中,那会更好。因此,我们可以通过从头开始阅读问题来更轻松地帮助您。

port 是一个 OS X 包管理器,称为 MacPorts。因此,要使其正常工作,您必须首先从 http://www.macports.org/ 安装 MacPorts。

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/.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文