gpt4 book ai didi

openssl - mysql2:库未加载:自制软件更新后的/usr/local/opt/openssl/lib/libssl.1.0.0.dylib

转载 作者:行者123 更新时间:2023-12-03 15:13:28 26 4
gpt4 key购买 nike

我从 v10.14.0 升级了 mac OS Mojave 之后至 v10.14.2和 Homebrew 安装的所有软件包当我运行 bin/rails console 时,我开始收到以下错误:

/Users/hirurg103/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/bootsnap-1.4.4/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require': dlopen(/Users/hirurg103/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/mysql2-0.4.4/lib/mysql2/mysql2.bundle, 9): Library not loaded: /usr/local/opt/openssl/lib/libssl.1.0.0.dylib (LoadError)
Referenced from: /usr/local/opt/mysql@5.6/lib/libmysqlclient.18.dylib
Reason: image not found - /Users/hirurg103/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/mysql2-0.4.4/lib/mysql2/mysql2.bundle

我试图卸载 mysql2 gem 并使用 cpp 和 ld 标志安装它:
gem uninstall mysql2
gem install mysql2 -v 0.4.4 -- --with-cppflags=-I/usr/local/opt/openssl/include/openssl --with-ldflags=-L/usr/local/opt/openssl/lib

但它没有帮助。

我也尝试升级 mysql2到最新版本(在撰写本文时 v0.5.3),但它也不起作用
ls -l /usr/local/opt/openssl/lib给我:
total 14472
drwxr-xr-x 4 hirurg103 staff 128 Sep 10 16:13 engines-1.1
-r--r--r-- 1 hirurg103 staff 2265596 Dec 13 19:06 libcrypto.1.1.dylib
-r--r--r-- 1 hirurg103 staff 3930864 Sep 10 16:13 libcrypto.a
lrwxr-xr-x 1 hirurg103 staff 19 Sep 10 16:13 libcrypto.dylib -> libcrypto.1.1.dylib
-r--r--r-- 1 hirurg103 staff 485860 Dec 13 19:06 libssl.1.1.dylib
-r--r--r-- 1 hirurg103 staff 720400 Sep 10 16:13 libssl.a
lrwxr-xr-x 1 hirurg103 staff 16 Sep 10 16:13 libssl.dylib -> libssl.1.1.dylib
drwxr-xr-x 5 hirurg103 staff 160 Dec 13 19:06 pkgconfig

我没看到 libssl.1.0.0.dylib那里 mysql2提示

你以前遇到过这个错误吗?
你能解决它吗?如何解决?

最佳答案

OpenSSL 1.0 reached EOL on 2019-12-31

重装 mysql2 gem 与 --with-cflags--with-ldflags指向 openssl@1.1 的参数修复了错误:

gem uninstall mysql2
gem install mysql2 -v 0.4.4 -- --with-cflags=\"-I/usr/local/opt/openssl@1.1/include\" --with-ldflags=\"-L/usr/local/opt/openssl@1.1/lib\"

bundle install

关于openssl - mysql2:库未加载:自制软件更新后的/usr/local/opt/openssl/lib/libssl.1.0.0.dylib,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59327094/

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