我刚刚发现我已经不能再进行gem push …了一些挖掘工作,这使我需要更新我的RVM SSL证书.
我跑了,rvm osx-ssl-certs status all但那给了我:
/Users/davesag/.rvm/rubies/ruby-2.0.0-p195/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:45:in `require': dlopen(/Users/davesag/.rvm/rubies/ruby-2.0.0-p195/lib/ruby/2.0.0/x86_64-darwin12.4.0/openssl.bundle, 9): Library not loaded: /opt/local/lib/libssl.1.0.0.dylib (LoadError)
Referenced from: /Users/davesag/.rvm/rubies/ruby-2.0.0-p195/lib/ruby/2.0.0/x86_64-darwin12.4.0/openssl.bundle
Reason: image not found - /Users/davesag/.rvm/rubies/ruby-2.0.0-p195/lib/ruby/2.0.0/x86_64-darwin12.4.0/openssl.bundle
from /Users/davesag/.rvm/rubies/ruby-2.0.0-p195/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:45:in `require'
from /Users/davesag/.rvm/rubies/ruby-2.0.0-p195/lib/ruby/2.0.0/openssl.rb:17:in `<top (required)>'
from /Users/davesag/.rvm/rubies/ruby-2.0.0-p195/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:45:in `require'
from /Users/davesag/.rvm/rubies/ruby-2.0.0-p195/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:45:in `require'
Certificates for /usr/local/etc/openssl/cert.pem: Up to date.
Certificates for : Old.
Certificates for /etc/openssl/cert.pem: Up to date.
Run Code Online (Sandbox Code Playgroud)
rvm -v 显示我正在运行最新的RVM(截至今天)
rvm 1.22.15 (stable) by Wayne E. Seguin <wayneeseguin@gmail.com>, Michal Papis <mpapis@gmail.com> [https://rvm.io/]
Run Code Online (Sandbox Code Playgroud)
奇怪的是,我不知道为什么它指的ruby-2.0.0-p195不过是rvm list给 …
当我尝试运行命令时:
import psycopg2
Run Code Online (Sandbox Code Playgroud)
我收到错误:
ImportError: dlopen(/Users/gwulfs/anaconda/lib/python2.7/site-packages/psycopg2/_psycopg.so, 2): Library not loaded: libssl.1.0.0.dylib
Referenced from: /Users/gwulfs/anaconda/lib/python2.7/site-packages/psycopg2/_psycopg.so
Reason: image not found
Run Code Online (Sandbox Code Playgroud)
到目前为止,我已经尝试brew install openssl并引用(没有运气):
psycopg2安装错误 - 未加载库:libssl.dylib
http://joshuakehn.com/2013/10/13/Postgresapp-and-psycopg2-on-OS-X.html
更新Homebrew后使用
brew update
brew upgrade --all
Run Code Online (Sandbox Code Playgroud)
导致Python更新到2.7.10_2,pip(以及许多其他脚本)失败了
cffi.ffiplatform.VerificationError: importing '/usr/local/lib/python2.7/site-packages/cryptography/_Cryptography_cffi_a269d620xd5c405b7.so': dlopen(/usr/local/lib/python2.7/site-packages/cryptography/_Cryptography_cffi_a269d620xd5c405b7.so, 2): Library not loaded: /usr/local/lib/libssl.1.0.0.dylib
Referenced from: /usr/local/lib/python2.7/site-packages/cryptography/_Cryptography_cffi_a269d620xd5c405b7.so
Reason: image not found
Run Code Online (Sandbox Code Playgroud)
我该怎么做才能恢复或调整我的Python配置,以便它再次运行?Homebrew做了什么摧毁了它?
Traceback (most recent call last):
File "/usr/local/bin/eb", line 7, in <module>
from ebcli.core.ebcore import main
File "/usr/local/lib/python2.7/site-packages/ebcli/core/ebcore.py", line 43, in <module>
from . import globals, base, io, hooks
File "/usr/local/lib/python2.7/site-packages/ebcli/core/hooks.py", line 20, in <module>
from ..lib import aws
File "/usr/local/lib/python2.7/site-packages/ebcli/lib/aws.py", line 19, in <module>
import botocore.session
File "/usr/local/lib/python2.7/site-packages/ebcli/bundled/botocore/session.py", line 27, in <module>
import botocore.credentials
File "/usr/local/lib/python2.7/site-packages/ebcli/bundled/botocore/credentials.py", …Run Code Online (Sandbox Code Playgroud) 我正在尝试在Mac OS上安装Homebrew(macOS Mojave版本10.14.3)
而且我不断收到以下错误(我在终端中看到的确切消息):
dyld: Library not loaded: @rpath/libssl.1.0.0.dylib
Referenced from: /Users/[my_machine_name]/anaconda3/lib/libssh2.1.dylib
Reason: image not found
Run Code Online (Sandbox Code Playgroud)
我看到很多解决方案在其解决方案中都提到了一些与brew相关的命令,但是我试图在此处安装brew,所以我还没有brew。我想知道我该怎么办?
编辑:
我正在使用以下命令来安装brew:
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
Run Code Online (Sandbox Code Playgroud) 我尝试在 iPython 中导入 MySQLdb 并收到以下错误。
ImportError Traceback (most recent call last)
<ipython-input-4-f5538763dbdb> in <module>()
----> 1 import MySQLdb as mdb
2 import sys
/Users/user1/anaconda/lib/python2.7/site-packages/MySQLdb/__init__.py in <module>()
17 from MySQLdb.release import __version__, version_info, __author__
18
---> 19 import _mysql
20
21 if version_info != _mysql.version_info:
ImportError: dlopen(/Users/user1/anaconda/lib/python2.7/site-packages/_mysql.so, 2): Library not loaded: libssl.1.0.0.dylib
Referenced from: /Users/user1/anaconda/lib/python2.7/site-packages/_mysql.so
Reason: image not found
Run Code Online (Sandbox Code Playgroud)
我在 Stackoverflow 上发现了一些类似性质的帖子,其中建议应该禁用系统完整性保护,我现在已经有了。
我还按照这篇文章中针对 OSX El Capitan 的建议编辑了我的 bashprofile,Python mysqldb: Library not loaded: libmysqlclient.18.dylib但我仍然无法克服这个问题。
多一点信息以防它有助于诊断问题:
python ×3
homebrew ×2
macos ×2
python-2.7 ×2
database ×1
mysql ×1
mysql-python ×1
pip ×1
postgresql ×1
ruby ×1
rvm ×1
ssl ×1