在Mountain Lion上安装带有RVM的ree-1.8.7 [复制]

时间:2021-06-22 07:16:43

This question already has an answer here:

这个问题在这里已有答案:

I had a fresh install of Mountain Lion and installed the Xcode Command Line Tools, . I was able to get homebrew running and installed RVM. Unfortunately, I can't get RVM to install ree-1.8.7-head. It fails when compiling. I thought it was related to X11, so I installed XQuartz. Still no joy. Then I went ahead and installed the full Xcode from the app store. Still no joy. Anyone gotten this going on a fresh Mountain Lion install?

我全新安装了Mountain Lion并安装了Xcode Command Line Tools。我能够运行自制程序并安装RVM。不幸的是,我无法让RVM安装ree-1.8.7-head。编译时失败。我认为这与X11有关,所以我安装了XQuartz。仍然没有快乐。然后我继续从应用程序商店安装完整的Xcode。仍然没有快乐。有人在新山狮安装上得到这个吗?

From the bottom of the .rvm/log/ree-1.8.7-head/make.log:

从.rvm / log / ree-1.8.7-head / make.log的底部:

Find Tcl/Tk libraries. Make tcltklib.so which is required by Ruby/Tk.
gcc -I. -I../.. -I../../. -I../.././ext/tk -DHAVE_RB_SAFE_LEVEL -DHAVE_RB_HASH_LOOKUP -DHAVE_RB_PROC_NEW -DHAVE_RB_OBJ_TAINT -DHAVE_ST_PTR -DHAVE_ST_LEN -DRUBY_VERSION=\"1.8.7\" -DRUBY_RELEASE_DATE=\"2012-02-08\"  -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE   -DWITH_TCL_ENABLE_THREAD=0 -fno-common -g -O2 -pipe -fno-common   -c stubs.c
In file included from stubs.c:10:
/usr/include/tk.h:78:23: error: X11/Xlib.h: No such file or directory
In file included from stubs.c:10:
/usr/include/tk.h:549: error: expected declaration specifiers or ‘...’ before ‘Window’
/usr/include/tk.h:549: error: ‘Window’ declared as function returning a function

. .

。 。

/usr/include/tkDecls.h:1240: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute

__’ before ‘Tk_GetBitmapFromObj’
/usr/include/tkDecls.h:1245: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
/usr/include/tkDecls.h:1356: error: expected ‘)’ before ‘*’ token
/usr/include/tkDecls.h:1362: error: expected ‘)’ before ‘*’ token
/usr/include/tkDecls.h:1387: error: expected declaration specifiers or ‘...’ before ‘GC’
/usr/include/tkDecls.h:1399: error: expected declaration specifiers or ‘...’ before ‘GC’
/usr/include/tkDecls.h:1413: error: expected declaration specifiers or ‘...’ before ‘Pixmap’
/usr/include/tkDecls.h:1420: error: expected declaration specifiers or ‘...’ before ‘XColor’
/usr/include/tkDecls.h:1448: error: expected declaration specifiers or ‘...’ before ‘Pixmap’
/usr/include/tkDecls.h:1524: error: expected ‘)’ before ‘*’ token
/usr/include/tkDecls.h:1621: error: expected declaration specifiers or ‘...’ before ‘Drawable’
/usr/include/tkDecls.h:1656: error: expected ‘)’ before ‘*’ token
/usr/include/tkDecls.h:1661: error: expected ‘)’ before ‘*’ token
/usr/include/tkDecls.h:1692: error: expected specifier-qualifier-list before ‘XColor’
make[1]: *** [stubs.o] Error 1
make: *** [all] Error 1

2 个解决方案

#1


16  

try

尝试

rvm reinstall 1.8.7 --without-tcl --without-tk

but still your problem might to be related to gcc-4.2 -> it's required for MRI ruby, there are some successes with llvm/clang, but still it fails with Fibers

但仍然你的问题可能与gcc-4.2有关 - >它是MRI红宝石所需要的,llvm / clang有一些成功,但它仍然在纤维上失败了

#2


0  

If you don't need tcl or tk and are using rbenv, this should work:

如果你不需要tcl或tk并且正在使用rbenv,这应该可行:

brew install https://raw.github.com/Homebrew/homebrew-dupes/master/apple-gcc42.rb

CC=/usr/local/bin/gcc-4.2 CONFIGURE_OPTS="--without-tcl --without-tk" rbenv install 1.8.7-p358

#1


16  

try

尝试

rvm reinstall 1.8.7 --without-tcl --without-tk

but still your problem might to be related to gcc-4.2 -> it's required for MRI ruby, there are some successes with llvm/clang, but still it fails with Fibers

但仍然你的问题可能与gcc-4.2有关 - >它是MRI红宝石所需要的,llvm / clang有一些成功,但它仍然在纤维上失败了

#2


0  

If you don't need tcl or tk and are using rbenv, this should work:

如果你不需要tcl或tk并且正在使用rbenv,这应该可行:

brew install https://raw.github.com/Homebrew/homebrew-dupes/master/apple-gcc42.rb

CC=/usr/local/bin/gcc-4.2 CONFIGURE_OPTS="--without-tcl --without-tk" rbenv install 1.8.7-p358