2

Mac10.8.2にrubyreeまたはruby1.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 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からのログはこちら

4

3 に答える 3

1

apple-gcc42brew でインストールされた rvm が見つからなかったようです。

gcc-4.2経由で利用可能であることを確認するかPATH、パスを使用してインストールを実行します。

rvm reinstall 1.8.7 --with-gcc=/path/to/brew/apple-gcc42/gcc-4.2

EDIT1:チェックしたところ、RVMも検索するgcc-apple-4.2ため、オンになっている場合はPATHRVMによって自動的に使用されます-これはRVM 1.16.8で更新されました。

于 2012-09-20T13:50:49.500 に答える
1

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
于 2013-03-18T16:17:37.823 に答える
1

わかりました、私は解決策を見つけました。

  1. Xcode を削除します。
  2. ここから、Mountain Lion のパッケージをダウンロードしました。
  3. ダウンロードした osx-gcc-installer をインストールします。
  4. Xcode (およびコマンドライン ツール) をインストールします。

それだけです。

于 2012-10-08T15:16:35.200 に答える