gpt4 book ai didi

macos - OpenSSL 无法使用 gem ruby​​gems 或 brew 或 bundle 加载库

转载 作者:行者123 更新时间:2023-12-04 17:00:06 25 4
gpt4 key购买 nike

我使用 brew 0.9.5,我为 ruby​​ 2.1.2 安装了 rbenv 0.4.0 和 ruby​​-build。

有一段时间没有碰任何东西,经过几次 osx 更新:

 bundle

给出:
/usr/local/Cellar/rbenv/versions/2.1.2/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:54:in `require': dlopen(/usr/local/Cellar/rbenv/versions/2.1.2/lib/ruby/2.1.0/x86_64-darwin13.0/digest/sha1.bundle, 9): Library not loaded: @@HOMEBREW_PREFIX@@/opt/openssl/lib/libcrypto.1.0.0.dylib (LoadError)
Referenced from: /usr/local/Cellar/rbenv/versions/2.1.2/lib/ruby/2.1.0/x86_64-darwin13.0/digest/sha1.bundle
Reason: image not found - /usr/local/Cellar/rbenv/versions/2.1.2/lib/ruby/2.1.0/x86_64-darwin13.0/digest/sha1.bundle
from /usr/local/Cellar/rbenv/versions/2.1.2/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from /usr/local/Cellar/rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/bundler-1.6.3/lib/bundler/definition.rb:1:in `<top (required)>'
from /usr/local/Cellar/rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/bundler-1.6.3/lib/bundler.rb:153:in `definition'
from /usr/local/Cellar/rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/bundler-1.6.3/lib/bundler/cli/install.rb:76:in `run'
from /usr/local/Cellar/rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/bundler-1.6.3/lib/bundler/cli.rb:146:in `install'
from /usr/local/Cellar/rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/bundler-1.6.3/lib/bundler/vendor/thor/command.rb:27:in `run'
from /usr/local/Cellar/rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/bundler-1.6.3/lib/bundler/vendor/thor/invocation.rb:121:in `invoke_command'
from /usr/local/Cellar/rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/bundler-1.6.3/lib/bundler/vendor/thor.rb:363:in `dispatch'
from /usr/local/Cellar/rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/bundler-1.6.3/lib/bundler/vendor/thor/base.rb:440:in `start'
from /usr/local/Cellar/rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/bundler-1.6.3/lib/bundler/cli.rb:9:in `start'
from /usr/local/Cellar/rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/bundler-1.6.3/bin/bundle:20:in `block in <top (required)>'
from /usr/local/Cellar/rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/bundler-1.6.3/lib/bundler/friendly_errors.rb:5:in `with_friendly_errors'
from /usr/local/Cellar/rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/bundler-1.6.3/bin/bundle:20:in `<top (required)>'
from /usr/local/Cellar/rbenv/versions/2.1.2/bin/bundle:23:in `load'
from /usr/local/Cellar/rbenv/versions/2.1.2/bin/bundle:23:in `<main>'

我试过 brew uninstall openssl && brew install openssl。

我试过 brew link openssl --force。

我试图升级一切。

到目前为止,一切都没有奏效。

我无法启动 puma、捆绑或更新 gems。
gem update --system

ERROR: Loading command: update (LoadError)
dlopen(/usr/local/Cellar/rbenv/versions/2.1.2/lib/ruby/2.1.0/x86_64-darwin13.0/openssl.bundle, 9): Library not loaded: @@HOMEBREW_PREFIX@@/opt/openssl/lib/libssl.1.0.0.dylib
Referenced from: /usr/local/Cellar/rbenv/versions/2.1.2/lib/ruby/2.1.0/x86_64-darwin13.0/openssl.bundle
Reason: image not found - /usr/local/Cellar/rbenv/versions/2.1.2/lib/ruby/2.1.0/x86_64-darwin13.0/openssl.bundle
ERROR: While executing gem ... (NoMethodError)
undefined method `invoke_with_build_args' for nil:NilClass

gem -v:2.4.0
brew --env

HOMEBREW_CC: clang
HOMEBREW_CXX: clang++
MAKEFLAGS: -j4
CMAKE_PREFIX_PATH: /usr/local
CMAKE_INCLUDE_PATH: /usr/include/libxml2:/System/Library/Frameworks/OpenGL.framework/Versions/Current/Headers
CMAKE_LIBRARY_PATH: /System/Library/Frameworks/OpenGL.framework/Versions/Current/Libraries
PKG_CONFIG_LIBDIR: /usr/lib/pkgconfig:/usr/local/Library/ENV/pkgconfig/10.9
ACLOCAL_PATH: /usr/local/share/aclocal
PATH: /usr/local/Library/ENV/4.3:/usr/bin:/bin:/usr/sbin:/sbin


brew config

HOMEBREW_VERSION: 0.9.5
ORIGIN: https://github.com/Homebrew/homebrew.git
HEAD: 49e6d09f85a999a4a4d82b2d47bd837ed342d8cb
HOMEBREW_PREFIX: /usr/local
HOMEBREW_CELLAR: /usr/local/Cellar
CPU: quad-core 64-bit haswell
OS X: 10.9.5-x86_64
CLT: 6.0.0.0.1.1410400753
Clang: 6.0 build 600
X11: 2.7.6 => /opt/X11
System Ruby: 2.0.0-481
Perl: /usr/bin/perl
Python: /usr/bin/python
Ruby: /usr/local/Cellar/rbenv/shims/ruby

brew uses --installed openssl
postgresql ruby-build

如果有人有线索......我会接受它!

最佳答案

不知道为什么以及如何但是:

rbenv install 2.1.2
rbenv: /usr/local/Cellar/rbenv/versions/2.1.2 already exists
continue with installation? (y/N) y

现在它起作用了!只需要重新安装我的 ruby​​,就像它以某种方式重新链接 openssl 一样......

我现在可以再次工作了,但只是为了让我知道更多会发生什么,如果有人知道幕后机制,我会很高兴听到它。

关于macos - OpenSSL 无法使用 gem ruby​​gems 或 brew 或 bundle 加载库,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25946856/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com