ruby-rvm不能再在Mac OS X Mountain Lion上安装1.8.7-p352

前端之家收集整理的这篇文章主要介绍了ruby-rvm不能再在Mac OS X Mountain Lion上安装1.8.7-p352前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
我将rvm升级到1.15.8,然后在zsh中出现一些问题后恢复到1.15.7.降级后,我的Ruby 1.9版本恢复正常,但1.8.7将不会再安装.

发生两个错误:@H_301_3@

Error running 'patch -F 25 -p1 -N -f <"/Users/me/.rvm/patches/ruby/1.8.7/stdout-rouge-fix.patch"',please read /Users/me/.rvm/log/ruby-1.8.7-p352/patch.apply.stdout-rouge-fix.log

文件内容是:@H_301_3@

[2012-09-11 01:05:59] patch -F 25 -p1 -N -f <"/Users/me/.rvm/patches/ruby/1.8.7/stdout-rouge-fix.patch"
patching file lib/mkmf.rb
Hunk #1 Failed at 201.
1 out of 1 hunk Failed -- saving rejects to file lib/mkmf.rb.rej

和:@H_301_3@

Error running 'make ',please read /Users/me/.rvm/log/ruby-1.8.7-p352/make.log

运行make时出错.停止安装.@H_301_3@

并且该文件内容是(仅错误的前几行):@H_301_3@

Fail to find [tclConfig.sh,tkConfig.sh]
Use MacOS X Frameworks.

Find Tcl/Tk libraries. Make tcltklib.so which is required by Ruby/Tk.
gcc-4.2 -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=\"2011-06-30\"  -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: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/tk.h:552: error: expected declaration specifiers or ‘...’ before ‘XEvent’
/usr/include/tk.h:561: error: expected specifier-qualifier-list before ‘Tk_ClassCreateProc’
/usr/include/tk.h:655: error: expected specifier-qualifier-list before ‘Bool’
/usr/include/tk.h:677: error: expected specifier-qualifier-list before ‘Bool’
/usr/include/tk.h:756: error: expected specifier-qualifier-list before ‘Display’
/usr/include/tk.h:902: error: expected declaration specifiers or ‘...’ before ‘XPoint’
/usr/include/tk.h:996: error: expected declaration specifiers or ‘...’ before ‘Display’

支持的一个应用是1.8.7.我死在水里这似乎可能是山狮与rvm的问题.任何人都可以指向正确的方向吗?@H_301_3@

更新:@H_301_3@

我通过执行“重新安装”而不是“安装”来解决第一个错误.尽管1.8.7-p352不在命令“rvm list rubies”中给出的红宝石列表中.@H_301_3@

解决方法

通过ruby 1.8.7检测tcl / tk是有问题的,解决方法是禁用它:
rvm reinstall 1.8.7 --without-tcl --without-tk

需要tcl / tk时的另一个解决方案:http://stackoverflow.com/a/11666019/497756@H_301_3@

原文链接:https://www.f2er.com/ruby/273755.html

猜你在找的Ruby相关文章