Cannot install Ruby on macOS with ruby-build master HEAD #1972
-
Steps to reproduce the behaviorI crafted the following commands to illustrate the failure and a workaround I found. $ cd ~/ && rbenv uninstall 3.1.2 ; cd ~/.rbenv/plugins/ruby-build && git checkout master && git pull && git checkout master && cd ~/ && rbenv install 3.1.2
rbenv: version `3.1.2' not installed
Already on 'master'
Your branch is up to date with 'origin/master'.
Already up to date.
Already on 'master'
Your branch is up to date with 'origin/master'.
Downloading openssl-1.1.1n.tar.gz...
-> https://dqw8nmjcqpjn7.cloudfront.net/40dceb51a4f6a5275bde0e6bf20ef4b91bfc32ed57c0552e2e8e15463372b17a
Installing openssl-1.1.1n...
/Users/bitaxis/.rbenv/plugins/ruby-build/bin/ruby-build: line 1127: /Users/bitaxis/.rbenv/versions/3.1.2/openssl/ssl/cert.pem: No such file or directory
BUILD FAILED (macOS 11.6.5 using ruby-build 20220426-1-gc0d87ea)
Inspect or clean up the working tree at /var/folders/0_/t8r10cy136zdyrlvn5bwcsj40000gn/T/ruby-build.20220507103919.25039.e3WTdS
Results logged to /var/folders/0_/t8r10cy136zdyrlvn5bwcsj40000gn/T/ruby-build.20220507103919.25039.log
Last 10 log lines:
created directory `/Users/bitaxis/.rbenv/versions/3.1.2/openssl/lib/engines-1.1'
*** Installing engines
install engines/capi.dylib -> /Users/bitaxis/.rbenv/versions/3.1.2/openssl/lib/engines-1.1/capi.dylib
install engines/padlock.dylib -> /Users/bitaxis/.rbenv/versions/3.1.2/openssl/lib/engines-1.1/padlock.dylib
make depend && make _build_programs
make[1]: Nothing to be done for `_build_programs'.
created directory `/Users/bitaxis/.rbenv/versions/3.1.2/openssl/bin'
*** Installing runtime programs
install apps/openssl -> /Users/bitaxis/.rbenv/versions/3.1.2/openssl/bin/openssl
install ./tools/c_rehash -> /Users/bitaxis/.rbenv/versions/3.1.2/openssl/bin/c_rehash Expected vs. actual behaviorI expect this to work with the code on master, but it fails as indicated above. However, the exact same commands but with the latest tag work as expected. $ cd ~/ && rbenv uninstall 3.1.2 ; cd ~/.rbenv/plugins/ruby-build && git checkout master && git pull && git checkout v20220426 && cd ~/ && rbenv install 3.1.2
rbenv: version `3.1.2' not installed
Already on 'master'
Your branch is up to date with 'origin/master'.
Already up to date.
Note: switching to 'v20220426'.
You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at deb3dd0 ruby-build 20220426
Downloading openssl-1.1.1n.tar.gz...
-> https://dqw8nmjcqpjn7.cloudfront.net/40dceb51a4f6a5275bde0e6bf20ef4b91bfc32ed57c0552e2e8e15463372b17a
Installing openssl-1.1.1n...
Installed openssl-1.1.1n to /Users/bitaxis/.rbenv/versions/3.1.2
Downloading ruby-3.1.2.tar.gz...
-> https://cache.ruby-lang.org/pub/ruby/3.1/ruby-3.1.2.tar.gz
Installing ruby-3.1.2...
Installed ruby-3.1.2 to /Users/bitaxis/.rbenv/versions/3.1.2
$ rbenv shell 3.1.2 && ruby --version
ruby 3.1.2p20 (2022-04-12 revision 4491bb740a) [x86_64-darwin20] LogsAlready provided above. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 4 replies
-
Having a similar-looking problem, due to the following lines in
There's a one-commit diff between
I'm guessing the original invocation included a default target that put the "etc"/conf dir in place, that This should be an Issue, not a Discussion thread... |
Beta Was this translation helpful? Give feedback.
Having a similar-looking problem, due to the following lines in
ruby-build
:$OPENSSLDIR
doesn't exist, so thesecurity find-certificate
invocations fail.There's a one-commit diff between
master
and the tag @bitaxis references, most relevant is: