rvm install ree在Mountain Lion上使用XCode查找/ opt / local - 但我没有MacPorts

时间:2013-02-04 21:33:39

标签: ruby rvm

我无法使用

安装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

1 个答案:

答案 0 :(得分: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时遇到其他无关的问题,但至少这部分不再是问题。