Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Install fails on 10.8.3 without Xcode installed #1928

Closed
AJ-Acevedo opened this issue May 28, 2013 · 25 comments
Closed

Install fails on 10.8.3 without Xcode installed #1928

AJ-Acevedo opened this issue May 28, 2013 · 25 comments

Comments

@AJ-Acevedo
Copy link

Just tried to install rvm today using:
$ \curl -L https://get.rvm.io | bash -s stable --autolibs=enable --ruby

This is after installing the command line tools and homebrew.
It didn't require Xcode to be installed in the past. But now, the install fails asking to specify the installed Xcode with xcode-select.

XCode requires 1.25 GB of disk space which is a lot on an SSD if you don't need it.

This is my cheatsheet that I've used on several installations without any trouble until today.
https://gist.github.com/AJ-Acevedo/5519193

@mpapis
Copy link
Member

mpapis commented May 29, 2013

please gist the output of:

rvm --debug requirements ruby

@jhottenstein
Copy link

I have a similar issue.

I'm using 10.8.4 with Command Line Tools for Xcode (but not the full Xcode package)

gist of rvm --debug requirements ruby: https://gist.github.com/jhottenstein/5679098

@mpapis
Copy link
Member

mpapis commented May 31, 2013

@jhottenstein what is in the log file /Users/jhottenstein/.rvm/log/1369929975_package_install_autoconf_automake_libtool_pkgconfig_apple-gcc42_libiconv_libyaml_libffi_readline_libxml2_libxslt_libksba_openssl_curl-ca-bundle_sqlite3_zlib_gdbm_ncurses.log ?

@AJ-Acevedo
Copy link
Author

@mpapis Slight correction to my originally posted comment. I attempted to install rvm as a multi-user install not a single user install using:
\curl -L https://get.rvm.io | sudo bash -s stable --autolibs=enable --ruby using zsh as my command shell. I also attempted to use ruby 1.9.3.
\curl -L https://get.rvm.io | sudo bash -s stable --autolibs=enable --ruby=1.9.3

I don't think the output of rvm --debug requirements ruby is going to be helpful in my use case as after it failed, I then installed XCode and ran sudo xcode-select -switch / at the same time. I was then able to successfully install rvm. Not sure if sudo xcode-select -switch / or installing XCode fixed. it.

If you think it would be helpful, I can run through the entire process again on a fresh install when I get a free moment. Just let me know.

@mpapis
Copy link
Member

mpapis commented May 31, 2013

@AJ-Acevedo I do not see where it would require XCode, if you get time you can divide the process in few steps:

\curl -L https://get.rvm.io | sudo bash -s stable
source /usr/local/rvm/scripts/rvm
rvm autolibs enable
rvm --debug requirements ruby
rvm --debug use --install ruby

@AJ-Acevedo
Copy link
Author

Performed the following steps on a clean 10.8.3 after installing command line tools and homebrew:

$ \curl -L https://get.rvm.io | sudo bash -s stable
$ source /usr/local/rvm/scripts/rvm
$ rvm autolibs enable

Received the following errors after rvm autolibs enable:

/usr/local/rvm/scripts/db: line 44: /usr/local/rvm/user/db.new: Permission denied
mv: rename /usr/local/rvm/user/db.new to /usr/local/rvm/user/db: No such file or directory
/usr/local/rvm/scripts/db: line 57: /usr/local/rvm/user/db: Permission denied
$ rvm --debug requirements ruby

rvm_autolibs_flag=4
Installing requirements for osx, might require sudo password.
requirements code for osx loaded
brew seems to be writable
Install custom packages: homebrew/dupes.
Custom packages: homebrew/dupes.
xcode-select: Error: No Xcode is selected. Use xcode-select -switch <path-to-xcode>, or see the xcode-select manpage (man xcode-select) for further information.
Already up-to-date.
Cloning into '/usr/local/Library/Taps/homebrew-dupes'...
remote: Counting objects: 903, done.
remote: Compressing objects: 100% (492/492), done.
remote: Total 903 (delta 495), reused 804 (delta 411)
Receiving objects: 100% (903/903), 157.16 KiB, done.
Resolving deltas: 100% (495/495), done.
Tapped 41 formula
Log file: /usr/local/rvm/log/1370034621_package_install_autoconf_automake_libtool_pkg-config_apple-gcc42_libyaml_readline_libxml2_libxslt_libksba_openssl.log
tee: /usr/local/rvm/log/1370034621_package_install_autoconf_automake_libtool_pkg-config_apple-gcc42_libyaml_readline_libxml2_libxslt_libksba_openssl.log: Permission denied
[2013-05-31 17:10:21] requirements_osx_brew_libs_install
requirements_osx_brew_libs_install () 
{ 
    brew unlink "$@" || true;
    brew install "$@" || { 
        typeset ret=$?;
        rvm_warn "There were package installation errors, make sure to read the log.
Check Homebrew requirements https://github.com/mxcl/homebrew/wiki/Installation";
        case "$_system_version" in 
            10.6)
                rvm_warn "On OSX 10.6 instead of command line tools install:
    https://github.com/downloads/kennethreitz/osx-gcc-installer/GCC-10.6.pkg"
            ;;
        esac;
        return $ret
    }
}
current path: /Users/admin
command(12): requirements_osx_brew_libs_install autoconf automake libtool pkg-config apple-gcc42 libyaml readline libxml2 libxslt libksba openssl
tee: /usr/local/rvm/log/1370034621_package_install_autoconf_automake_libtool_pkg-config_apple-gcc42_libyaml_readline_libxml2_libxslt_libksba_openssl.log: Permission denied
Installing required packages: autoconf, automake, libtool, pkg-config, apple-gcc42, libyaml, readline, libxml2, libxslt, libksba, openssl..............................................................................................................................................
Error running 'requirements_osx_brew_libs_install autoconf automake libtool pkg-config apple-gcc42 libyaml readline libxml2 libxslt libksba openssl',
please read /usr/local/rvm/log/1370034621_package_install_autoconf_automake_libtool_pkg-config_apple-gcc42_libyaml_readline_libxml2_libxslt_libksba_openssl.log
__rvm_rm_rf already gone: /usr/local/rvm/tmp/318*
$ rvm --debug use --install ruby
mkdir: /usr/local/rvm/log/ruby-2.0.0-p195: Permission denied
ruby-2.0.0-p195 is not installed.
ruby-2.0.0-p195 - install
mkdir: /usr/local/rvm/log/ruby-2.0.0-p195: Permission denied
Searching for binary rubies, this might take some time.
Remote file does not exist https://rvm.io/binaries/osx/10.8/x86_64/ruby-2.0.0-p195.tar.bz2
Remote file does not exist http://jruby.org.s3.amazonaws.com/downloads/ruby-2.0.0-p195.tar.bz2
Remote file does not exist http://binaries.rubini.us/osx/10.8/x86_64/ruby-2.0.0-p195.tar.bz2
rvm_remote_server_url3 not found
No remote file name found
No binary rubies available for: osx/10.8/x86_64/ruby-2.0.0-p195.
Continuing with compilation. Please read 'rvm mount' to get more information on binary rubies.
__rvm_setup_compile_environment_setup ruby-2.0.0-p195
rvm_autolibs_flag=4
__rvm_setup_compile_environment_requirements ruby-2.0.0-p195
Installing requirements for osx, might require sudo password.
requirements code for osx loaded
brew seems to be writable
Found required packages: autoconf, automake, libtool, pkg-config, libyaml, readline, libxml2, libxslt, libksba, openssl.
rvm_configure_flags+=( --with-opt-dir=/usr/local/opt/libyaml )
rvm_configure_flags+=( --with-opt-dir=/usr/local/opt/readline )
rvm_configure_flags+=( --with-opt-dir=/usr/local/opt/libxml2 )
rvm_configure_flags+=( --with-opt-dir=/usr/local/opt/libxslt )
rvm_configure_flags+=( --with-opt-dir=/usr/local/opt/libksba )
rvm_configure_flags+=( --with-opt-dir=/usr/local/opt/openssl )
Updating certificates in '/usr/local/etc/openssl/cert.pem'.
__rvm_setup_compile_environment_osx_compiler ruby-2.0.0-p195
__rvm_setup_compile_environment_architectures ruby-2.0.0-p195
__rvm_setup_compile_environment_gcc47plus ruby-2.0.0-p195
__rvm_setup_compile_environment_bison ruby-2.0.0-p195
__rvm_setup_compile_environment_smartos ruby-2.0.0-p195
__rvm_setup_compile_environment_sunos ruby-2.0.0-p195
__rvm_setup_compile_environment_openbsd ruby-2.0.0-p195
__rvm_setup_compile_environment_auto_conf_make ruby-2.0.0-p195
__rvm_setup_compile_environment_flags_docs ruby-2.0.0-p195
__rvm_setup_compile_environment_flags_tcltk ruby-2.0.0-p195
__rvm_setup_compile_environment_flags_shared_static ruby-2.0.0-p195
__rvm_setup_compile_environment_flags_threads ruby-2.0.0-p195
found compiler: /usr/bin/clang
Installing Ruby from source to: /usr/local/rvm/rubies/ruby-2.0.0-p195, this may take a while depending on your cpu(s)...
ruby-2.0.0-p195 - #downloading ruby-2.0.0-p195, this may take a while depending on your connection...
No archive, downloading
Running(11): curl --fail --location --max-redirs 10 --create-dirs -C - -o ruby-2.0.0-p195.tar.bz2 http://ftp.ruby-lang.org/pub/ruby/2.0/ruby-2.0.0-p195.tar.bz2
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0Warning: Failed to create the file ruby-2.0.0-p195.tar.bz2: Permission denied
  0 10.3M    0  1103    0     0   1234      0  2:25:58 --:--:--  2:25:58  2403
curl: (23) Failed writing body (0 != 1103)
There was an error(23), please check /usr/local/rvm/log//*.log. Next we'll try to fetch via http.
Trying ftp:// URL instead.
Running(11): curl --fail --location --max-redirs 10 --create-dirs -C - -o ruby-2.0.0-p195.tar.bz2 ftp:///ftp.ruby-lang.org/pub/ruby/2.0/ruby-2.0.0-p195.tar.bz2
curl: (6) Could not resolve host: ftp; nodename nor servname provided, or not known
There was an error(6), please check /usr/local/rvm/log//*.log
There has been an error fetching the ruby interpreter. Halting the installation.
Gemset '' does not exist, 'rvm gemset create ' first, or append '--create'.
__rvm_rm_rf already gone: /usr/local/rvm/tmp/318*

An ls -al /usr/local/rvm shows that the owner is root and the group is rvm but the current user was not added to the rvm group.
The following will add the current user to the rvm group:
$ sudo /usr/sbin/dseditgroup -o edit -a $USER -t user rvm

Want me to run it again after adding the current user to the rvm group?

@mpapis
Copy link
Member

mpapis commented May 31, 2013

yes you need to be in rvm group, this should be enough too:

sudo rvm group add rvm $USER

and then gist:

rvm --trace requirements ruby

the xcode-select error seems unrelated to the later fail

@mpapis
Copy link
Member

mpapis commented May 31, 2013

make sure to include the last mentioned log file

@AJ-Acevedo
Copy link
Author

Here is a gist of the output for rvm --trace requirements ruby after adding $USER to the group rvm.
https://gist.github.com/AJ-Acevedo/5688730

@mpapis
Copy link
Member

mpapis commented Jun 1, 2013

I do not see xcode-select in the output, it is possible that not being in rvm group was changing some important behaviors, or are all requirements already installed?

@AJ-Acevedo
Copy link
Author

I'll start it over on a clean install and do the following:

  1. Install 10.8.3
  2. Install command line tools
  3. Install Homebrew...
$ \curl -L https://get.rvm.io | sudo bash -s stable
$ source /usr/local/rvm/scripts/rvm
$ sudo /usr/sbin/dseditgroup -o edit -a $USER -t user rvm
$ rvm autolibs enable
$ rvm --debug requirements ruby
$ rvm --debug use --install ruby

And report back tomorrow.

@AJ-Acevedo
Copy link
Author

I followed the steps listed in my previous comment and everything installed and works perfectly.

Here is a gist of the logs: https://gist.github.com/AJ-Acevedo/5691287

So it looks like the following will fail because the user is not being added to the group rvm. Is it possible to have the installation add the user to the group rvm after it is created?
\curl -L https://get.rvm.io | sudo bash -s stable --autolibs=enable --ruby

@mpapis
Copy link
Member

mpapis commented Jun 1, 2013

ah yes you can:

\curl -L https://get.rvm.io | sudo bash -s stable --autolibs=enable  --add-to-rvm-group $USER --ruby

@jhottenstein
Copy link

[2013-05-30 09:06:15] requirements_osx_port_libs_install
requirements_osx_port_libs_install ()
{
__rvm_try_sudo port install "$@" || {
typeset ret=$?;
rvm_warn "There were package installation errors, make sure to read
the log.";
return $ret
}
}
current path: /Users/jhottenstein
command(19): requirements_osx_port_libs_install autoconf automake libtool
pkgconfig apple-gcc42 libiconv libyaml libffi readline libxml2 libxslt
libksba openssl curl-ca-bundle sqlite3 zlib gdbm ncurses
Error:
Error: No Xcode installation was found.
Error: Please install Xcode and/or run xcode-select to specify its location.
Error:
Error: The installed version of Xcode (2.0orlower) is too old to use on the
installed OS version. Version 4.5.2 or later is recommended on Mac OS X
10.8.
To report a bug, follow the instructions in the guide:
http://guide.macports.org/#project.tickets
Error: Processing of port autoconf failed

There were package installation errors, make sure to read the log.

On Fri, May 31, 2013 at 9:32 AM, Michal Papis notifications@github.comwrote:

@jhottenstein https://github.com/jhottenstein what is in the log file
/Users/jhottenstein/.rvm/log/1369929975_package_install_autoconf_automake_libtool_pkgconfig_apple-gcc42_libiconv_libyaml_libffi_readline_libxml2_libxslt_libksba_openssl_curl-ca-bundle_sqlite3_zlib_gdbm_ncurses.log?


Reply to this email directly or view it on GitHubhttps://github.com//issues/1928#issuecomment-18756027
.

@mpapis
Copy link
Member

mpapis commented Jun 1, 2013

[2013-05-30 09:06:15] requirements_osx_port_libs_install
requirements_osx_port_libs_install ()
{
    __rvm_try_sudo port install "$@" || {
        typeset ret=$?;
        rvm_warn "There were package installation errors, make sure to read
the log.";
        return $ret
    }
}
current path: /Users/jhottenstein
command(19): requirements_osx_port_libs_install autoconf automake libtool
pkgconfig apple-gcc42 libiconv libyaml libffi readline libxml2 libxslt
libksba openssl curl-ca-bundle sqlite3 zlib gdbm ncurses
Error:
Error: No Xcode installation was found.
Error: Please install Xcode and/or run xcode-select to specify its location.
Error:
Error: The installed version of Xcode (2.0orlower) is too old to use on the
installed OS version. Version 4.5.2 or later is recommended on Mac OS X
10.8.
To report a bug, follow the instructions in the guide:
    http://guide.macports.org/#project.tickets
Error: Processing of port autoconf failed

There were package installation errors, make sure to read the log.

@jhottenstein
Copy link

I'm not sure what you mean.

I feel like its telling me that it couldn't find xcode but I have xcode
command line tools installed.

On Sat, Jun 1, 2013 at 12:24 PM, Michal Papis notifications@github.comwrote:

[2013-05-30 09:06:15] requirements_osx_port_libs_install
requirements_osx_port_libs_install (){
__rvm_try_sudo port install "$@" || {
typeset ret=$?;
rvm_warn "There were package installation errors, make sure to readthe log.";
return $ret
}}
current path: /Users/jhottensteincommand(19): requirements_osx_port_libs_install autoconf automake libtool
pkgconfig apple-gcc42 libiconv libyaml libffi readline libxml2 libxslt
libksba openssl curl-ca-bundle sqlite3 zlib gdbm ncurses
Error:
Error: No Xcode installation was found.
Error: Please install Xcode and/or run xcode-select to specify its location.
Error:
Error: The installed version of Xcode (2.0orlower) is too old to use on the
installed OS version. Version 4.5.2 or later is recommended on Mac OS X
10.8.
To report a bug, follow the instructions in the guide:
http://guide.macports.org/#project.tickets
Error: Processing of port autoconf failed

There were package installation errors, make sure to read the log.

Reply to this email directly or view it on GitHubhttps://github.com//issues/1928#issuecomment-18795414
.

@AJ-Acevedo
Copy link
Author

@jhottenstein Please post the command(s) you used before you received the error.

@jhottenstein
Copy link

Sure. I'll implode rvm and macports and do it again.

@jhottenstein
Copy link

Gist with 3 files:

  1. command line steps and output
  2. output from rvm log
  3. output from port log

https://gist.github.com/jhottenstein/5694454

Please let me know if you need any additional information and thanks for your attention!

@AJ-Acevedo
Copy link
Author

@jhottenstein Are you using zsh or bash? I too received the xcode-select error, though I was using zsh. When I started over on a clean system, I was using bash.

@jhottenstein
Copy link

$ sh --version -> GNU bash, version 3.2.48(1)-release (x86_64-apple-darwin12)

On Sun, Jun 2, 2013 at 4:26 PM, AJ notifications@github.com wrote:

@jhottenstein https://github.com/jhottenstein Are you using zsh or
bash? I too received the xcode-select error, though I was using zsh. When I
started over on a clean system, I was using bash.


Reply to this email directly or view it on GitHubhttps://github.com//issues/1928#issuecomment-18816262
.

@jhottenstein
Copy link

Looks like xcode-select isn't reliable when using just command line tools:

$ xcode-select --print-path
/Volumes/Xcode/Xcode45-DP1.app/Contents/Developer

$ xcodebuild -version
xcrun: Error: could not stat active Xcode path '/Volumes/Xcode/Xcode45-DP1.app/Contents/Developer'. (No such file or directory)

@mpapis
Copy link
Member

mpapis commented Jun 3, 2013

this problem is from macports, can you check each package step by step which one is failing:

port install autoconf
port install automake
port install libtool
port install pkgconfig
port install apple-gcc42
port install libiconv
port install libyaml
port install libffi
port install readline
port install libxml2
port install libxslt
port install libksba
port install openssl
port install curl-ca-bundle
port install sqlite3
port install zlib
port install gdbm
port install ncurses

you do not have to run them all - just till you get the error

@jhottenstein
Copy link

Bingo. Any of them fail. I guess it wasn't clear to me that those errors
were coming from port not rvm.

I'll try using a different package manager and find/open an issue with
macports.

Thanks for your guidance.

$ sudo port install automake
Error:
Error: No Xcode installation was found.
Error: Please install Xcode and/or run xcode-select to specify its location.
Error:
Error: The installed version of Xcode (2.0orlower) is too old to use on the
installed OS version. Version 4.5.2 or later is recommended on Mac OS X
10.8.
To report a bug, follow the instructions in the guide:
http://guide.macports.org/#project.tickets
Error: Processing of port automake failed

On Sun, Jun 2, 2013 at 5:09 PM, Michal Papis notifications@github.comwrote:

this problem is from macports, can you check each package step by step
which one is failing:

port install autoconf
port install automake
port install libtool
port install pkgconfig
port install apple-gcc42
port install libiconv
port install libyaml
port install libffi
port install readline
port install libxml2
port install libxslt
port install libksba
port install openssl
port install curl-ca-bundle
port install sqlite3
port install zlib
port install gdbm
port install ncurses

you do not have to run them all - just till you get the error


Reply to this email directly or view it on GitHubhttps://github.com//issues/1928#issuecomment-18816884
.

@mpapis
Copy link
Member

mpapis commented Jun 3, 2013

I did not hit this issue, but my system is pretty mixed with 4 different package managers checked out already ... anyway if you get any information from macports how to fix it please let me know - till then I'm closing it as it's not rvm's fault (if we can do anything to make it better we will do it - when we know what it is).

@mpapis mpapis closed this as completed Jun 3, 2013
@pkuczynski pkuczynski added this to the rvm-1.27.0-before milestone May 8, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants