5

Я скачал инструменты командной строки для Mac OSx. Проверено на git-версию. Затем попытался установить RVM:

MacBook-Pro:~ Tom$ curl -L https://get.rvm.io | bash -s stable
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   185  100   185    0     0     97      0  0:00:01  0:00:01 --:--:--   106
100 10648  100 10648    0     0   4164      0  0:00:02  0:00:02 --:--:--  118k
Downloading RVM from wayneeseguin branch stable
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   131  100   131    0     0    209      0 --:--:-- --:--:-- --:--:--   524
100 1488k  100 1488k    0     0   820k      0  0:00:01  0:00:01 --:--:-- 1578k

Installing RVM to /Users/Tom/.rvm/
    Adding rvm PATH line to /Users/Tom/.bashrc /Users/Tom/.zshrc.
    Adding rvm loading line to /Users/Tom/.bash_profile /Users/Tom/.zprofile.

# RVM:  Shell scripts enabling management of multiple ruby environments.
# RTFM: https://rvm.io/
# HELP: http://webchat.freenode.net/?channels=rvm (#rvm on irc.freenode.net)
# Cheatsheet: http://cheat.errtheblog.com/s/rvm/
# Screencast: http://screencasts.org/episodes/how-to-use-rvm

# In case of any issues read output of 'rvm requirements' and/or 'rvm notes'

Installation of RVM in /Users/Tom/.rvm/ is almost complete:

  * To start using RVM you need to run `source /Users/Tom/.rvm/scripts/rvm`
    in all your open shell windows, in rare cases you need to reopen all shell windows.

# Tom,
#
#   Thank you for using RVM!
#   I sincerely hope that RVM helps to make your life easier and
#   more enjoyable!!!
#
# ~Wayne

Я попытался проверить версию с помощью rvm --version но команда rvm не была найдена. Затем я запустил dvm source /Users/Tom/.rvm/scripts/rvm и версия, показанная в следующий раз, использовала rvm --version . Кажется, все хорошо. Но потом пытаюсь установить ruby 1.9.3

Thomass-MacBook-Pro:~ Tom$ rvm install 1.9.3
Searching for binary rubies, this might take some time.
No binary rubies available for: osx/10.8/x86_64/ruby-1.9.3-p374.
Continuing with compilation. Please read 'rvm mount' to get more information on binary rubies.
Fetching yaml-0.1.4.tar.gz to /Users/Tom/.rvm/archives
######################################################################## 100.0%
Extracting yaml to /Users/Tom/.rvm/src/yaml-0.1.4
Configuring yaml in /Users/Tom/.rvm/src/yaml-0.1.4.
Compiling yaml in /Users/Tom/.rvm/src/yaml-0.1.4.
Installing yaml to /Users/Tom/.rvm/usr
Installing Ruby from source to: /Users/Tom/.rvm/rubies/ruby-1.9.3-p374, this may take a while depending on your cpu(s)...
ruby-1.9.3-p374 - #downloading ruby-1.9.3-p374, this may take a while depending on your connection...
######################################################################## 100.0%
ruby-1.9.3-p374 - #extracting ruby-1.9.3-p374 to /Users/Tom/.rvm/src/ruby-1.9.3-p374
ruby-1.9.3-p374 - #extracted to /Users/Tom/.rvm/src/ruby-1.9.3-p374
ruby-1.9.3-p374 - #configuring
ruby-1.9.3-p374 - #compiling
Error running 'make', please read /Users/Tom/.rvm/log/ruby-1.9.3-p374/make.log
There has been an error while running make. Halting the installation.

Это содержимое make.log:

`

Thomass-MacBook-Pro:~ Tom$ vim /Users/Tom/.rvm/log/ruby-1.9.3-p374/make.log

[2013-02-01 17:44:00] make
        CC = clang
        LD = ld
        LDSHARED = clang -dynamic -bundle
        CFLAGS = -O3 -ggdb -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-field-initializers -Werror=pointer-arith -Werror=write-strings -Werror=declaration-after-statement -Werror=shorten-64-to-32 -Werror=implicit-function-declaration  -pipe
        XCFLAGS = -include ruby/config.h -include ruby/missing.h -fvisibility=hidden -DRUBY_EXPORT
        CPPFLAGS = -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE   -I/Users/Tom/.rvm/usr/include -I. -I.ext/include/x86_64-darwin12.2.1 -I./include -I.
        DLDFLAGS = -Wl,-undefined,dynamic_lookup -Wl,-multiply_defined,suppress -Wl,-flat_namespace
        SOLIBS =
compiling regparse.c
regparse.c:582:15: error: implicit conversion loses integer precision: 'st_index_t' (aka 'unsigned long') to 'int' [-Werror,-Wshorten-64-to-32]
    return t->num_entries;
    ~~~~~~ ~~~^~~~~~~~~~~
1 error generated.
make: *** [regparse.o] Error 1
~                                                                               
"~/.rvm/log/ruby-1.9.3-p374/make.log" 15L, 954C

1 ответ1

8

Установите GCC 4.2 с помощью homebrew и попробуйте снова. Это сработало для меня.

brew update
brew tap homebrew/dupes
brew install apple-gcc42

Смотрите также:

Всё ещё ищете ответ? Посмотрите другие вопросы с метками .