OpenSSL / libcrypto.dylib Sublime Text 3 中的包控制问题

OpenSSL / libcrypto.dylib Problem with Package Control in Sublime Text 3

Package Control 未在 MacOS、Catalina 10.15.6 上的 Sublime Text 3 运行 中加载。

None 的包控制命令显示在命令面板中。

我检查过 Package Control 不在 ignored_packages 中,手动重新安装了 Package Control(多次),甚至卸载并重新安装了 Sublime Text 3。

当我启动 Sublime Text 3 时,当它尝试加载 Package Control 时,控制台中会显示以下错误。看起来这个问题在某种程度上与 OpenSSL 有关,特别是 libcrypto.dylib 文件。

我最近 updated/upgraded 我的系统使用 Homebrew,我怀疑是在更新​​过程中发生了什么导致了这个问题。

reloading plugin Package Control.Package Control
Traceback (most recent call last):
  File "/Applications/Sublime Text.app/Contents/MacOS/sublime_plugin.py", line 125, in reload_plugin
    m = importlib.import_module(modulename)
  File "./python3.3/importlib/__init__.py", line 90, in import_module
  File "<frozen importlib._bootstrap>", line 1584, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1565, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1532, in _find_and_load_unlocked
  File "/Applications/Sublime Text.app/Contents/MacOS/sublime_plugin.py", line 1199, in load_module
    exec(compile(source, source_path, 'exec'), mod.__dict__)
  File "/Users/bader/Library/Application Support/Sublime Text 3/Installed Packages/Package Control.sublime-package/Package Control.py", line 89, in <module>
  File "<frozen importlib._bootstrap>", line 1565, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1532, in _find_and_load_unlocked
  File "/Applications/Sublime Text.app/Contents/MacOS/sublime_plugin.py", line 1199, in load_module
    exec(compile(source, source_path, 'exec'), mod.__dict__)
  File "/Users/bader/Library/Application Support/Sublime Text 3/Installed Packages/Package Control.sublime-package/package_control/commands/__init__.py", line 3, in <module>
  File "<frozen importlib._bootstrap>", line 1565, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1532, in _find_and_load_unlocked
  File "/Applications/Sublime Text.app/Contents/MacOS/sublime_plugin.py", line 1199, in load_module
    exec(compile(source, source_path, 'exec'), mod.__dict__)
  File "/Users/bader/Library/Application Support/Sublime Text 3/Installed Packages/Package Control.sublime-package/package_control/commands/advanced_install_package_command.py", line 10, in <module>
  File "<frozen importlib._bootstrap>", line 1565, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1532, in _find_and_load_unlocked
  File "/Applications/Sublime Text.app/Contents/MacOS/sublime_plugin.py", line 1199, in load_module
    exec(compile(source, source_path, 'exec'), mod.__dict__)
  File "/Users/bader/Library/Application Support/Sublime Text 3/Installed Packages/Package Control.sublime-package/package_control/package_manager.py", line 34, in <module>
  File "<frozen importlib._bootstrap>", line 1565, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1532, in _find_and_load_unlocked
  File "/Applications/Sublime Text.app/Contents/MacOS/sublime_plugin.py", line 1199, in load_module
    exec(compile(source, source_path, 'exec'), mod.__dict__)
  File "/Users/bader/Library/Application Support/Sublime Text 3/Installed Packages/Package Control.sublime-package/package_control/downloaders/__init__.py", line 20, in <module>
  File "<frozen importlib._bootstrap>", line 1565, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1532, in _find_and_load_unlocked
  File "/Applications/Sublime Text.app/Contents/MacOS/sublime_plugin.py", line 1199, in load_module
    exec(compile(source, source_path, 'exec'), mod.__dict__)
  File "/Users/bader/Library/Application Support/Sublime Text 3/Installed Packages/Package Control.sublime-package/package_control/downloaders/oscrypto_downloader.py", line 44, in <module>
  File "<frozen importlib._bootstrap>", line 1565, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1532, in _find_and_load_unlocked
  File "/Applications/Sublime Text.app/Contents/MacOS/sublime_plugin.py", line 1199, in load_module
    exec(compile(source, source_path, 'exec'), mod.__dict__)
  File "/Users/bader/Library/Application Support/Sublime Text 3/Installed Packages/Package Control.sublime-package/package_control/deps/oscrypto/tls.py", line 11, in <module>
  File "<frozen importlib._bootstrap>", line 1565, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1532, in _find_and_load_unlocked
  File "/Applications/Sublime Text.app/Contents/MacOS/sublime_plugin.py", line 1199, in load_module
    exec(compile(source, source_path, 'exec'), mod.__dict__)
  File "/Users/bader/Library/Application Support/Sublime Text 3/Installed Packages/Package Control.sublime-package/package_control/deps/oscrypto/_mac/tls.py", line 39, in <module>
  File "<frozen importlib._bootstrap>", line 1565, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1532, in _find_and_load_unlocked
  File "/Applications/Sublime Text.app/Contents/MacOS/sublime_plugin.py", line 1199, in load_module
    exec(compile(source, source_path, 'exec'), mod.__dict__)
  File "/Users/bader/Library/Application Support/Sublime Text 3/Installed Packages/Package Control.sublime-package/package_control/deps/oscrypto/_mac/util.py", line 208, in <module>
  File "<frozen importlib._bootstrap>", line 1565, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1532, in _find_and_load_unlocked
  File "/Applications/Sublime Text.app/Contents/MacOS/sublime_plugin.py", line 1199, in load_module
    exec(compile(source, source_path, 'exec'), mod.__dict__)
  File "/Users/bader/Library/Application Support/Sublime Text 3/Installed Packages/Package Control.sublime-package/package_control/deps/oscrypto/_openssl/_libcrypto.py", line 15, in <module>
  File "<frozen importlib._bootstrap>", line 1565, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1532, in _find_and_load_unlocked
  File "/Applications/Sublime Text.app/Contents/MacOS/sublime_plugin.py", line 1199, in load_module
    exec(compile(source, source_path, 'exec'), mod.__dict__)
  File "/Users/bader/Library/Application Support/Sublime Text 3/Installed Packages/Package Control.sublime-package/package_control/deps/oscrypto/_openssl/_libcrypto_ctypes.py", line 30, in <module>
  File "./python3.3/ctypes/__init__.py", line 353, in __init__
OSError: dlopen(/usr/local/lib/libcrypto.dylib, 6): no suitable image found.  Did find:
    /usr/local/lib/libcrypto.dylib: mach-o, but wrong architecture
    /usr/local/lib/libcrypto.dylib: mach-o, but wrong architecture

@MattDMo,你是对的,这是一个 32 位与 64 位的问题,Will Bond 会提供帮助。在 Package Control 上发布 ticket 后,@wbond 立即回复建议我移动文件 /usr/local/lib/libcrypto.dylib.

为了完整起见,@wbond要求终端命令的输出:

file /usr/local/lib/libcrypto.dylib

返回

/usr/local/lib/libcrypto.dylib: Mach-O dynamically linked shared library i386

他写道:

Hmm, I don't think there is a 32bit version of macOS 11. I'd move that file and restart Sublime Text.

他是对的,而且奏效了。