Unable to install Ruby versions >= 2.7.2. The error is "dyld: Library not loaded" for libruby.2.7.dylib #1856
-
I am unable to install Ruby versions >= 2.7.2. The error is "dyld: Library not loaded" error for libruby.2.7.dylib. The error for Ruby 3.0.0 is similar. I'm on macOS Big Sur.
|
Beta Was this translation helpful? Give feedback.
Replies: 9 comments 1 reply
-
Same error with Catalina (10.15.7) and xcode (Version 12.4 (12D4e)) |
Beta Was this translation helpful? Give feedback.
-
Check your Bad:
Good:
|
Beta Was this translation helpful? Give feedback.
-
The above works around the issue. Should Rubies 2.7+ fail to build when the current directory ( |
Beta Was this translation helpful? Give feedback.
-
I had the same issue, but it was another problem in the
Removing of second colon symbol helped. |
Beta Was this translation helpful? Give feedback.
-
I had the same error, but my OS is mac 10.15.7 and my path is as follow:
I don't know what's wrong? Output of
|
Beta Was this translation helpful? Give feedback.
-
@huyvohcmc have you tried removing as many of those paths from your |
Beta Was this translation helpful? Give feedback.
-
@chmurph2 Yeah it was Android SDK paths. |
Beta Was this translation helpful? Give feedback.
-
I had the same error message when trying to install a second ruby version using asdf (this seemed to be independent of which version I installed first, after that I got dyld: Library not loaded). When using rbenv I can install multiple ruby versions without problems |
Beta Was this translation helpful? Give feedback.
-
I had the same problem on an Intel MacOS Big Sur. I was running I first tried simplifying my path as per other posts here, but it didn't help in my case. I also found another open bug report about Sophos AV interfering with rbenv install, so I removed that and my error message changed, but still wasn't successful. I ended up getting it working by running So, it's possible I had some older artefacts in there from a file transfer from a previous workstation, or it half-installed from one of my many earlier attempts, and this half-installation caused problems. It's also highly possible I don't know what I'm talking about when it comes to ruby: 🐶 ⌨️ . Anyway, I hope this story helps someone. Like many others, it's simply a toolchain dependency I need to do other things, and I'm quite unfamiliar with it when things like this go wrong. Props to the maintainers of both |
Beta Was this translation helpful? Give feedback.
Check your
PATH
. After removing.:
(current directory), Ruby 2.7+ installs for me successfully.Bad:
Good: