mac 10.7.4 按照 wiki 文档执行 rvm install 1.9.3 --with-readline-dir=$rvm_path/usr 出现如下提示
Ruby (and needed base gems) for your selection will be installed shortly. Before it happens, please read and execute the instructions below. Please use a separate terminal to execute any additional commands.
Notes for Mac OS X 10.7.4, Xcode 4.3.3.
For MacRuby: Install LLVM first. For JRuby: Install the JDK. See http://developer.apple.com/java/download/ # Current Java version "1.6.0_26" For IronRuby: Install Mono >= 2.6 For Ruby 1.9.3: Install libksba # If using Homebrew, 'brew install libksba' You can use & download osx-gcc-installer: https://github.com/kennethreitz/osx-gcc-installer ** NOTE: Currently, Node.js is having issues building with osx-gcc-installer. The only fix is to install Xcode over osx-gcc-installer. We had reports of http://hpc.sourceforge.net/ making things work, but it looks like not easiest/safest to setup. To use an RVM installed Ruby as default, instead of the system ruby:
:
这个我之前装的时候也遇到过 打开 xcode=> preference => downloads => Command Line Tools 安装这个。
提示不是写的很清楚吗
下载 https://github.com/downloads/kennethreitz/osx-gcc-installer/GCC-10.7-v2.pkg 这个包,安装之。
不过安装过这个之后安装 nodejs 会出现编译错误,解决方法是重新安装 xcode 的 command line tools。(貌似不止安装 node 会出现 make 不能编译的问题,很多时候都会出现,解决办法就是重新安装 CLT)
接着 rvm install 1.9.3 就可以了
gcc -v Using built-in specs. Target: i686-apple-darwin11 Configured with: /private/var/tmp/llvmgcc42/llvmgcc42-2336.9~22/src/configure --disable-checking --enable-werror --prefix=/Applications/Xcode.app/Contents/Developer/usr/llvm-gcc-4.2 --mandir=/share/man --enable-languages=c,objc,c++,obj-c++ --program-prefix=llvm- --program-transform-name=/^[cg][^.-]*$/s/$/-4.2/ --with-slibdir=/usr/lib --build=i686-apple-darwin11 --enable-llvm=/private/var/tmp/llvmgcc42/llvmgcc42-2336.9~22/dst-llvmCore/Developer/usr/local --program-prefix=i686-apple-darwin11- --host=x86_64-apple-darwin11 --target=i686-apple-darwin11 --with-gxx-include-dir=/usr/include/c++/4.2.1 Thread model: posix gcc version 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2336.9.00)
rvm install 1.9.2 --with-readline-dir=$rvm_path/usr 提示 Ruby (and needed base gems) for your selection will be installed shortly. Before it happens, please read and execute the instructions below. Please use a separate terminal to execute any additional commands.
Notes for Mac OS X 10.7.4, Xcode 4.3.3.
For MacRuby: Install LLVM first.
For JRuby: Install the JDK. See http://developer.apple.com/java/download/ # Current Java version "1.6.0_26" For IronRuby: Install Mono >= 2.6 For Ruby 1.9.3: Install libksba # If using Homebrew, 'brew install libksba'
You can use & download osx-gcc-installer: https://github.com/kennethreitz/osx-gcc-installer ** NOTE: Currently, Node.js is having issues building with osx-gcc-installer. The only fix is to install Xcode over osx-gcc-installer.
We had reports of http://hpc.sourceforge.net/ making things work, but it looks like not easiest/safest to setup.
To use an RVM installed Ruby as default, instead of the system ruby:
本机系统 Mac OS X 10.7.4 Xcode 4.3.3. 按照 9 楼手动设置也试过了还是这样
各种方式都试过了 gcc brew install libksba 打开 xcode=> preference => downloads => Command Line Tools 安装这个 sudo xcode-select -switch /Applications/Xcode.app/Contents/Developer 等都试过了 执行 rvm install 1.9.2 --with-readline-dir=$rvm_path/usr 还是报最开始贴的东西 难道人品问题 哎。。。。
你没有加载 rvm 到环境变量 加上这句到你的 .bash_profile 或者 .zshrc 里面
[[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm"
再 source 下之后试试
#18 楼 @diudiutang 哥们儿 刚执行 [[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm" source ~/.bash_profile rvm install 1.9.3 --with-readline-dir=$rvm_path/usr 同样报最开始贴的东西 还在郁闷中。。。。。
装了 xcode 的 command line tools 之后,再安装 homebrew,然后按照这篇文章操作就行了 http://jfire.io/blog/2012/03/02/xcode-4-dot-3-homebrew-and-ruby/
我用的 4.4 版本的 Xcode, 好像 developer.apple.com 上有单独的,我也不知道在哪。。我是直接下载别人上传的一般版本 4.4 Xcode 里面带的
https://www.dropbox.com/sh/pneetxuvlljc6m0/jlRLmI4MBo/xcode44cltools_10_86938106a.dmg
https://github.com/mxcl/homebrew/issues/6886 I reverted the install script. Either reinstall or make /usr/local writable for your user.
#34 楼 @IchiNiNiIchi ls -dl /usr/local drwxr-xr-x 10 root wheel 340 8 11 18:56 /usr/local
#34 楼 @IchiNiNiIchi ls -dl /usr/local/.git ls: /usr/local/.git: No such file or directory 貌似文件没有
最简单的方法就是重新安装一次 homebrew 或者你试一下以下的代码
sudo chmod 777 /usr/local
cd /usr/local
git remote add git://github.com/mxcl/homebrew.git
git reset --hard
git clean -f -d
git pull origin master
brew update
sudo chmod 775 /usr/local
#38 楼 @IchiNiNiIchi git remote add git://github.com/mxcl/homebrew.git 之后报如下 fatal: Not a git repository (or any of the parent directories): .git 还要执行 git reset --hard git clean -f -d git pull origin master brew update sudo chmod 775 /usr/local 这些吗
很好奇你是怎么安装 homebrew 的
要不你试着运行一下 homebrew 的安装脚本吧
ruby <(curl -fsSk https://raw.github.com/mxcl/homebrew/go)
#41 楼 @IchiNiNiIchi 执行 ruby <(curl -fsSk https://raw.github.com/mxcl/homebrew/go)
#46 楼 @IchiNiNiIchi Library 貌似隐藏着的,defaults write com.apple.finder AppleShowAllFiles -bool true 显示隐藏文件貌似也没用,请问还有什么方式可以删除
其实本质就是编译器的问题,因为现在 苹果的 gcc 是 llvm,xcode 4.2 改的版,把 gcc 和一些编译工具去掉了。但是如果你要编译东西要用 xcode 里面的 command line 或者去下载 osx-gcc-installer: https://github.com/kennethreitz/osx-gcc-installer 。
sudo chmod 777 /usr/local
cd /usr/local
git init
git remote add git://github.com/mxcl/homebrew.git
git reset --hard
git clean -f -d
git pull origin master
brew update
sudo chmod 775 /usr/local