Mountain Lion rvm 安装 1.8.7 x11 错误 [英] Mountain Lion rvm install 1.8.7 x11 error

查看:85
本文介绍了Mountain Lion rvm 安装 1.8.7 x11 错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

更新到 Mountain Lion 后,我尝试安装 1.8.7,但出现错误.找不到 X11 文件,我安装了 Xquarkz,但没有任何改变.怎么了?

After update to Mountain Lion, I tried install 1.8.7, and I got error. X11 file not found, I installed Xquarkz, but nothing changed. Whats wrong?

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

推荐答案

尝试通过 http://安装 X11xquartz.macosforge.org/landing/ 为编译器设置正确的 X11 库路径:

Try to install X11 via http://xquartz.macosforge.org/landing/ set the correct path to the X11 library for the compiler with:

export CPPFLAGS=-I/opt/X11/include

然后尝试重新安装ruby,传递给gcc-4.2所在的编译器:

then try to reinstall ruby, passing to the compiler where gcc-4.2 is:

CC=/usr/local/bin/gcc-4.2 rvm reinstall 1.8.7

如果没有 CC,我会遇到很多分段错误.

Without CC I got a lot of segmentation faults.

这篇关于Mountain Lion rvm 安装 1.8.7 x11 错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆