【问题标题】:rvm install ree looks for /opt/local on Mountain Lion with XCode - but I don't have MacPortsrvm install ree 使用 XCode 在 Mountain Lion 上查找 /opt/local - 但我没有 MacPorts
【发布时间】:2013-02-04 21:33:38
【问题描述】:

我无法使用

安装 Ruby REE
rvm install ree

因为编译器和链接器正在寻找 /opt/local。我在 /opt/local 中只有 X11,因为我不使用 MacPorts。

我使用 XCode 命令行工具安装了我的 C/C++ 编译器,而不是使用 https://github.com/kennethreitz/osx-gcc-installer。 (因为我希望 XCode 可供我使用,但它们不兼容。)

rvm 安装日志中对 /opt/local 的第一个引用是:

make PREINCFLAGS='-I/opt/local/include' PRELIBS='-L/opt/local/lib -Wl,-rpath,/Users/brian/.rvm/rubies/ree-1.8.7-2012.02/lib -L/Users/brian/.rvm/rubies/ree-1.8.7-2012.02/lib -lsystem_allocator'

从那里我收到许多关于在 /opt/local/include 和 /opt/local/lib 中找不到的文件的错误(因为这些目录在我的系统上不存在)。

我不知道为什么安装程序认为它会在 /opt/local 中找到头文件或库,我也不知道如何让它在正确的位置找到。

这是我的 GNU C++ 和 C 编译器:

/usr/bin$ ll g+* gcc*
lrwxr-xr-x  1 root  wheel  12 Feb  4 11:58 g++@ -> llvm-g++-4.2
lrwxr-xr-x  1 root  wheel  12 Feb  4 12:16 g++-4.2@ -> llvm-g++-4.2
lrwxr-xr-x  1 root  wheel  12 Feb  4 11:58 gcc@ -> llvm-gcc-4.2
lrwxr-xr-x  1 root  wheel  12 Jan  6 21:11 gcc-4.2@ -> llvm-gcc-4.2

我使用 Homebrew,但我没有安装任何与编译器相关的东西:

/usr/bin$ brew list
ack         coreutils   geoip       gnupg       libevent    little-cms2 ossp-uuid   qt          tmux
autoconf    ctags       gettext     htop-osx    libpng      macvim      phantomjs   readline    tree
automake    fontconfig  ghostscript imagemagick libtiff     memcached   pkg-config  redis       wget
cmake       freetds     gist        jbig2dec    libtool     mysql       postgresql  sqlite      xz
colordiff   freetype    git         jpeg        libyaml     ngrep       pstree      tig

【问题讨论】:

    标签: ruby rvm


    【解决方案1】:

    我想出了如何克服这个问题。所有关于 /opt/local 的东西都是红鲱鱼。我没有 /opt/local 的事实并没有造成任何问题。

    真正的问题在install.log下面:

    /usr/include/tk.h:78:23: error: X11/Xlib.h: No such file or directory
    

    修复是在安装ree时使用--without-tk --without-tcl

    rvm install ree --without-tk --without-tcl
    

    我在安装 ree 时仍然遇到其他不相关的问题,但至少这部分不再是问题。

    【讨论】:

      猜你喜欢
      • 2012-07-24
      • 2012-09-18
      • 2012-05-16
      • 2011-09-03
      • 2011-12-30
      • 2011-01-12
      • 2012-12-12
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多