rvm install fails with error: "__rvm_detect_max_threads:cd:21: string not in pwd: /***"
rvm install fails with error: "__rvm_detect_max_threads:cd:21: string not in pwd: /***"
我刚刚将我的 macO 升级到 Sierra,并尝试进行设置。在尝试使用 rvm 安装 ruby 时,我收到了这个非常奇怪的错误:
__rvm_detect_max_threads:cd:21: string not in pwd: /Users/sunday/workspace/contributions
我在目录 /workspace/contributions
中只有一个文件夹,不知道错误是什么,尝试删除 /workspace/contributions
,但错误仍然存在。
在使用 --debug
选项时,以下是我的轨迹:
~ rvm reinstall --debug 2.2.0 --disable-binary
2.2.0 - reinstall
ruby-2.2.0 - #already removed src/ruby-2.2.0
ruby-2.2.0 - #already removed rubies/ruby-2.2.0
ruby-2.2.0 - #already removed src/ruby-2.2.0
ruby-2.2.0 - #already removed rubies/ruby-2.2.0
Free disk space 73467MB, required 440MB.
__rvm_setup_compile_environment_setup ruby-2.2.0
rvm_autolibs_flag=enable
__rvm_setup_compile_environment_movable_early ruby-2.2.0
__rvm_setup_compile_environment_system_early ruby-2.2.0
__rvm_setup_compile_environment_requirements ruby-2.2.0
Checking requirements for osx.
requirements code for osx loaded
requirements lib type set to osx_brew
brew seems to be writable
Found required packages: autoconf, automake, libtool, pkg-config, libyaml, readline, libksba, openssl.
PATH=/usr/local/opt/pkg-config/bin:/usr/local/opt/libtool/bin:/usr/local/opt/automake/bin:/usr/local/opt/autoconf/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Users/sunday/.rvm/bin
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/libksba )
rvm_configure_flags+=( --with-opt-dir=/usr/local/opt/openssl )
Certificates in '/usr/local/etc/openssl/cert.pem' are already up to date.
Requirements installation successful.
__rvm_setup_compile_environment_movable ruby-2.2.0
__rvm_setup_compile_environment_parse_name ruby-2.2.0
__rvm_setup_compile_environment_system ruby-2.2.0
__rvm_setup_compile_environment_architectures ruby-2.2.0
rvm_architectures(0):.
__rvm_setup_compile_environment_gcc47plus ruby-2.2.0
__rvm_setup_compile_environment_bison ruby-2.2.0
__rvm_setup_compile_environment_flags_docs ruby-2.2.0
__rvm_setup_compile_environment_flags_shared_static ruby-2.2.0
__rvm_setup_compile_environment_flags_threads ruby-2.2.0
__rvm_detect_max_threads:cd:21: string not in pwd: /Users/sunday/workspace/contributions
__rvm_rm_rf already gone: /Users/sunday/.rvm/tmp/6618*
➜ ~ ruby -v
ruby 2.0.0p648 (2015-12-16 revision 53162) [universal.x86_64-darwin16]
➜ ~
当我尝试使用 install
而不是 reinstall
时也会发生这种情况。
这里可能发生了什么,我怎样才能解决这个问题以在我的机器上安装 ruby?
➜ ~ ruby -v
ruby 2.0.0p648 (2015-12-16 revision 53162) [universal.x86_64-darwin16]
删除 ruby 的达尔文版本,它在 osx 中作为默认值出现。
卸载 rvm
rvm implode
根据文档安装 rvm
\curl -sSL https://get.rvm.io | bash -s stable
重启终端,确认rvm安装正确
rvm notes
未使用 rvm 按要求安装 ruby 版本。
rvm install 2.2.0
在 Github 上关注此线程 https://github.com/rvm/rvm/issues/3686,我能够使用以下命令安装它:
rvm install ruby-2.3.1 --disable-binary -j 8
根据评论:
So it seems like the "detect number of CPU threads" functionality is, for whatever reason, breaking it on my machine.
我刚刚将我的 macO 升级到 Sierra,并尝试进行设置。在尝试使用 rvm 安装 ruby 时,我收到了这个非常奇怪的错误:
__rvm_detect_max_threads:cd:21: string not in pwd: /Users/sunday/workspace/contributions
我在目录 /workspace/contributions
中只有一个文件夹,不知道错误是什么,尝试删除 /workspace/contributions
,但错误仍然存在。
在使用 --debug
选项时,以下是我的轨迹:
~ rvm reinstall --debug 2.2.0 --disable-binary
2.2.0 - reinstall
ruby-2.2.0 - #already removed src/ruby-2.2.0
ruby-2.2.0 - #already removed rubies/ruby-2.2.0
ruby-2.2.0 - #already removed src/ruby-2.2.0
ruby-2.2.0 - #already removed rubies/ruby-2.2.0
Free disk space 73467MB, required 440MB.
__rvm_setup_compile_environment_setup ruby-2.2.0
rvm_autolibs_flag=enable
__rvm_setup_compile_environment_movable_early ruby-2.2.0
__rvm_setup_compile_environment_system_early ruby-2.2.0
__rvm_setup_compile_environment_requirements ruby-2.2.0
Checking requirements for osx.
requirements code for osx loaded
requirements lib type set to osx_brew
brew seems to be writable
Found required packages: autoconf, automake, libtool, pkg-config, libyaml, readline, libksba, openssl.
PATH=/usr/local/opt/pkg-config/bin:/usr/local/opt/libtool/bin:/usr/local/opt/automake/bin:/usr/local/opt/autoconf/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Users/sunday/.rvm/bin
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/libksba )
rvm_configure_flags+=( --with-opt-dir=/usr/local/opt/openssl )
Certificates in '/usr/local/etc/openssl/cert.pem' are already up to date.
Requirements installation successful.
__rvm_setup_compile_environment_movable ruby-2.2.0
__rvm_setup_compile_environment_parse_name ruby-2.2.0
__rvm_setup_compile_environment_system ruby-2.2.0
__rvm_setup_compile_environment_architectures ruby-2.2.0
rvm_architectures(0):.
__rvm_setup_compile_environment_gcc47plus ruby-2.2.0
__rvm_setup_compile_environment_bison ruby-2.2.0
__rvm_setup_compile_environment_flags_docs ruby-2.2.0
__rvm_setup_compile_environment_flags_shared_static ruby-2.2.0
__rvm_setup_compile_environment_flags_threads ruby-2.2.0
__rvm_detect_max_threads:cd:21: string not in pwd: /Users/sunday/workspace/contributions
__rvm_rm_rf already gone: /Users/sunday/.rvm/tmp/6618*
➜ ~ ruby -v
ruby 2.0.0p648 (2015-12-16 revision 53162) [universal.x86_64-darwin16]
➜ ~
当我尝试使用 install
而不是 reinstall
时也会发生这种情况。
这里可能发生了什么,我怎样才能解决这个问题以在我的机器上安装 ruby?
➜ ~ ruby -v
ruby 2.0.0p648 (2015-12-16 revision 53162) [universal.x86_64-darwin16]
删除 ruby 的达尔文版本,它在 osx 中作为默认值出现。
卸载 rvm
rvm implode
根据文档安装 rvm
\curl -sSL https://get.rvm.io | bash -s stable
重启终端,确认rvm安装正确
rvm notes
未使用 rvm 按要求安装 ruby 版本。
rvm install 2.2.0
在 Github 上关注此线程 https://github.com/rvm/rvm/issues/3686,我能够使用以下命令安装它:
rvm install ruby-2.3.1 --disable-binary -j 8
根据评论:
So it seems like the "detect number of CPU threads" functionality is, for whatever reason, breaking it on my machine.