Can';t通过RVM在Mac 10.8上安装ruby 1.8.7
我无法在Mac 10.8.2上安装ruby ree或ruby 1.8.7 我做到了:Can';t通过RVM在Mac 10.8上安装ruby 1.8.7,ruby,rvm,osx-mountain-lion,homebrew,ruby-1.8.7,Ruby,Rvm,Osx Mountain Lion,Homebrew,Ruby 1.8.7,我无法在Mac 10.8.2上安装ruby ree或ruby 1.8.7 我做到了: $ brew install libksba $ brew update $ brew install autoconf automake $ brew tap homebrew/dupes $ brew install autoconf automake apple-gcc42 然后我尝试安装ruby 1.8.7,但我不能 $ rvm install 1.8.7 No binary rubies avail
$ brew install libksba
$ brew update
$ brew install autoconf automake
$ brew tap homebrew/dupes
$ brew install autoconf automake apple-gcc42
然后我尝试安装ruby 1.8.7,但我不能
$ rvm install 1.8.7
No binary rubies available for: osx/10.8.2/x86_64/ruby-1.8.7-p370.
Continuing with compilation. Please read 'rvm mount' to get more information on binary rubies.
Building 'ruby-1.8.7-p370' using clang - but it's not (fully) supported, expect errors.
Installing Ruby from source to: /Users/serg/.rvm/rubies/ruby-1.8.7-p370, this may take a while depending on your cpu(s)...
ruby-1.8.7-p370 - #downloading ruby-1.8.7-p370, this may take a while depending on your connection...
ruby-1.8.7-p370 - #extracting ruby-1.8.7-p370 to /Users/serg/.rvm/src/ruby-1.8.7-p370
ruby-1.8.7-p370 - #extracted to /Users/serg/.rvm/src/ruby-1.8.7-p370
Applying patch /Users/serg/.rvm/patches/ruby/1.8.7/stdout-rouge-fix.patch
Applying patch /Users/serg/.rvm/patches/ruby/1.8.7/no_sslv2.diff
ruby-1.8.7-p370 - #configuring
ruby-1.8.7-p370 - #compiling
Error running 'make', please read /Users/serg/.rvm/log/ruby-1.8.7-p370/make.log
There has been an error while running make. Halting the installation.
Ruby 'ruby-1.8.7-p370' was built using clang - but it's not (fully) supported, expect errors.
Please be aware that you just installed a ruby that requires 2 patches just to be compiled on up to date linux system.
This may have known and unaccounted for security vulnerabilities.
Please consider upgrading to Ruby 1.9.3-194 which will have all of the latest security patches.
MacBook-Pro-Serg-L-6:smartlearn serg$ rvm remove 1.8.7
Removing /Users/serg/.rvm/src/ruby-1.8.7-p370...
/Users/serg/.rvm/rubies/ruby-1.8.7-p370 has already been removed.
Removing ruby-1.8.7-p370 aliases...
Removing ruby-1.8.7-p370 wrappers...
Removing ruby-1.8.7-p370 environments...
Removing ruby-1.8.7-p370 binaries...
错误:
Error running 'make', please read /Users/serg/.rvm/log/ruby-1.8.7-p370/make.log
There has been an error while running make. Halting the installation.
make.Log中的日志是看起来rvm没有找到随brew安装的
apple-gcc42
确保gcc-4.2
可通过PATH
访问,或使用指向它的路径运行安装:
rvm reinstall 1.8.7 --with-gcc=/path/to/brew/apple-gcc42/gcc-4.2
编辑1:
刚刚选中,RVM还搜索
gcc-apple-4.2
,因此如果它位于路径上,RVM将自动使用它-这已在RVM 1.16.8中更新。好的,我找到了解决方案
删除Xcode
我从网上下载了山狮的软件包
安装下载的osx gcc安装程序
安装Xcode(和命令行工具)
仅此而已。我尝试了GCC软件包,安装/卸载了Xcode等,但我认为有效的方法是:
rvm get stable
(响应包括另一个命令:
sudo sed -i'' -e "s#rvm_configure_env=('LDFLAGS=-L/opt/sm/pkg/active/lib CFLAGS=-I/opt/sm/pkg/active/include CPATH=/opt/sm/pkg/active/include')#rvm_configure_env=('LDFLAGS=-L/opt/sm/pkg/active/lib' 'CFLAGS=-I/opt/sm/pkg/active/include' 'CPATH=/opt/sm/pkg/active/include')#" /etc/rvmrc
)
我很确定这是成功的原因:
rvm install 1.9.3
对于任何需要Xcode的人来说,这是一个不可接受的解决方案。请看上面使用自制软件安装apple-gcc42的@mpapis解决方案(显然,gcc42是从Xcode 4.2开始删除的)。在那之后,rvm安装1.8.7没有问题。这确实帮助了我。做rvm得到稳定
,然后它就开始工作了。