0

所以我是新手。我正在尝试使用山狮在我的 Mac 上安装 ruby​​。我遵循本指南:http ://www.moncefbelyamani.com/how-to-install-xcode-homebrew-git-rvm-ruby-on-mac/

当我输入“brew doctor”时,会收到很多警告:

$ brew doctor
Warning: /Library/Frameworks/Mono.framework detected
This can be picked up by CMake's build system and likely cause the build to
fail. You may need to move this file out of the way to compile CMake.
Warning: Unbrewed dylibs were found in /usr/local/lib.
If you didn't put them there on purpose they could cause problems when
building Homebrew formulae, and may need to be deleted.

Unexpected dylibs:
    /usr/local/lib/libusb-0.1.4.dylib
    /usr/local/lib/libusb-1.0.0.dylib
    /usr/local/lib/libusbpp-0.1.4.dylib
Warning: Unbrewed .la files were found in /usr/local/lib.
If you didn't put them there on purpose they could cause problems when
building Homebrew formulae, and may need to be deleted.

Unexpected .la files:
    /usr/local/lib/libusb.la
    /usr/local/lib/libusbpp.la
Warning: Unbrewed .pc files were found in /usr/local/lib/pkgconfig.
If you didn't put them there on purpose they could cause problems when
building Homebrew formulae, and may need to be deleted.

Unexpected .pc files:
    /usr/local/lib/pkgconfig/fuse.pc
    /usr/local/lib/pkgconfig/libusb.pc
Warning: Unbrewed static libraries were found in /usr/local/lib.
If you didn't put them there on purpose they could cause problems when
building Homebrew formulae, and may need to be deleted.

Unexpected static libraries:
    /usr/local/lib/libusb.a
    /usr/local/lib/libusbpp.a

我应该怎么办?发生了什么?

4

4 回答 4

3

I would recommend that you manage your ruby installations with either RVM or RBENV it will make your life much easier to manage different versions, upgrades, etc.

于 2013-03-05T05:05:46.380 回答
1

使用RVM。RVM 允许您在同一台机器上安装和管理多个版本的 Ruby。

您可以按照此处的说明安装 RVM,并按照此处的说明安装 Ruby。第二个链接是一个很好的初学者指南,顺便说一下 ruby​​-on-rails。

于 2013-03-05T05:22:48.727 回答
1

您的 Mac 可能带有 Ruby 1.8.7。我喜欢 1.9.x 中的一些功能,并且它们最近发布了 2.0.0,因此您可能希望升级。但是,如果您不需要它,那么做任何工作都是没有意义的,所以首先确定您现在是否需要不同版本的 Ruby。(并使用 验证您的当前版本ruby -v)。

假设您需要一个新版本,RVM 和 rbenv 是两个工具,它们使安装和管理(也就是在)各种 Ruby 及其版本之间非常容易。有些人不喜欢 RVM,因为它会做一些奇怪的事情(比如覆盖cd- 更改目录的定义),但我发现它使用起来更简单,并且不需要你每次都记住 rehash。阅读并自己决定。

如果你想使用 RVM:

  1. 安装它(谷歌了解如何)。
  2. 确保在安装期间获取它告诉您在输出中执行的脚本。
  3. 开始使用它:(rvm install <version>例如rvm install 1.9.3),rvm use <version>(在版本之间切换),rvm list(查看您安装了哪些红宝石)等。
于 2013-03-05T05:24:40.000 回答
0

RVM 有更多的在线资源,所以它是一个不错的选择,因为你刚开始。注意控制台中的错误日志并用谷歌搜索,您可能会看到一些非常准确的结果(因为 ruby​​ 安装问题很常见)。

于 2013-03-05T07:08:23.940 回答