更新到Mountain Lion后,我尝试安装1.8.7,但出现错误。找不到X11文件,我安装了Xquarkz,但没有任何变化。怎么了?
Fail to find [tclConfig.sh, tkConfig.sh]
Use MacOS X Frameworks.
Find Tcl/Tk libraries. Make tcltklib.so which is required by Ruby/Tk.
clang -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-06-29\" -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -DWITH_TCL_ENABLE_THREAD=0 -fno-common -g -O2 -fno-common -pipe -fno-common -c stubs.c
In file included from stubs.c:10:
/usr/include/tk.h:78:11: fatal error: 'X11/Xlib.h' file not found
# include <X11/Xlib.h>
^
1 error generated.
make[1]: *** [stubs.o] Error 1
make: *** [all] Error 1发布于 2012-07-26 17:12:38
尝试通过http://xquartz.macosforge.org/landing/安装X11,使用以下命令为编译器设置X11库的正确路径:
export CPPFLAGS=-I/opt/X11/include然后尝试重新安装ruby,将其传递给编译器,其中的gcc-4.2是:
CC=/usr/local/bin/gcc-4.2 rvm reinstall 1.8.7没有CC,我得到了很多分割错误。
发布于 2012-12-10 01:09:29
我设法在OSX 10.8.2上执行了以下操作,没有出现任何问题:
rvm install 1.8.7 --with-gcc=clang --without-tcl --without-tk发布于 2012-12-03 12:17:59
如果你不需要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-p358https://stackoverflow.com/questions/11664835
复制相似问题