macOS 13.6上Sublime无法使用Package Control问题
最近升级系统重装Sublime后发现Package Control不能使用,在Settings -> Package Control下输入Install没有任何提示。
然后使用 CTRL ` 或者 View -> Show Console 查看日志,看到打印了一堆错误,内容如下:
代码语言:javascript复制Traceback (most recent call last):
File "/Users/kongxx/Library/Application Support/Sublime Text 3/Installed Packages/Package Control.sublime-package/package_control/deps/oscrypto/_openssl/_libcrypto_ctypes.py", line 305, in <module>
File "./python3.3/ctypes/__init__.py", line 366, in __getattr__
File "./python3.3/ctypes/__init__.py", line 371, in __getitem__
AttributeError: dlsym(0x221676320, EVP_PKEY_size): symbol not found
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Applications/Sublime Text.app/Contents/MacOS/Lib/python33/sublime_plugin.py", line 308, 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/Lib/python33/sublime_plugin.py", line 1692, in load_module
exec(compile(source, source_path, 'exec'), mod.__dict__)
File "/Users/kongxx/Library/Application Support/Sublime Text 3/Installed Packages/Package Control.sublime-package/2_bootstrap.py", line 26, 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/Lib/python33/sublime_plugin.py", line 1692, in load_module
exec(compile(source, source_path, 'exec'), mod.__dict__)
File "/Users/kongxx/Library/Application Support/Sublime Text 3/Installed Packages/Package Control.sublime-package/package_control/bootstrap.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/Lib/python33/sublime_plugin.py", line 1692, in load_module
exec(compile(source, source_path, 'exec'), mod.__dict__)
File "/Users/kongxx/Library/Application Support/Sublime Text 3/Installed Packages/Package Control.sublime-package/package_control/download_manager.py", line 24, 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/Lib/python33/sublime_plugin.py", line 1692, in load_module
exec(compile(source, source_path, 'exec'), mod.__dict__)
File "/Users/kongxx/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/Lib/python33/sublime_plugin.py", line 1692, in load_module
exec(compile(source, source_path, 'exec'), mod.__dict__)
File "/Users/kongxx/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/Lib/python33/sublime_plugin.py", line 1692, in load_module
exec(compile(source, source_path, 'exec'), mod.__dict__)
File "/Users/kongxx/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/Lib/python33/sublime_plugin.py", line 1692, in load_module
exec(compile(source, source_path, 'exec'), mod.__dict__)
File "/Users/kongxx/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/Lib/python33/sublime_plugin.py", line 1692, in load_module
exec(compile(source, source_path, 'exec'), mod.__dict__)
File "/Users/kongxx/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/Lib/python33/sublime_plugin.py", line 1692, in load_module
exec(compile(source, source_path, 'exec'), mod.__dict__)
File "/Users/kongxx/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/Lib/python33/sublime_plugin.py", line 1692, in load_module
exec(compile(source, source_path, 'exec'), mod.__dict__)
File "/Users/kongxx/Library/Application Support/Sublime Text 3/Installed Packages/Package Control.sublime-package/package_control/deps/oscrypto/_openssl/_libcrypto_ctypes.py", line 688, in <module>
Package Control.package_control.deps.oscrypto._ffi.FFIEngineError: Error initializing ctypes
reloading python 3.3 plugin Package Control.Package Control
Traceback (most recent call last):
File "/Users/kongxx/Library/Application Support/Sublime Text 3/Installed Packages/Package Control.sublime-package/package_control/deps/oscrypto/_openssl/_libcrypto_ctypes.py", line 305, in <module>
File "./python3.3/ctypes/__init__.py", line 366, in __getattr__
File "./python3.3/ctypes/__init__.py", line 371, in __getitem__
AttributeError: dlsym(0x221676320, EVP_PKEY_size): symbol not found
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Applications/Sublime Text.app/Contents/MacOS/Lib/python33/sublime_plugin.py", line 308, 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/Lib/python33/sublime_plugin.py", line 1692, in load_module
exec(compile(source, source_path, 'exec'), mod.__dict__)
File "/Users/kongxx/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/Lib/python33/sublime_plugin.py", line 1692, in load_module
exec(compile(source, source_path, 'exec'), mod.__dict__)
File "/Users/kongxx/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/Lib/python33/sublime_plugin.py", line 1692, in load_module
exec(compile(source, source_path, 'exec'), mod.__dict__)
File "/Users/kongxx/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/Lib/python33/sublime_plugin.py", line 1692, in load_module
exec(compile(source, source_path, 'exec'), mod.__dict__)
File "/Users/kongxx/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/Lib/python33/sublime_plugin.py", line 1692, in load_module
exec(compile(source, source_path, 'exec'), mod.__dict__)
File "/Users/kongxx/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/Lib/python33/sublime_plugin.py", line 1692, in load_module
exec(compile(source, source_path, 'exec'), mod.__dict__)
File "/Users/kongxx/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/Lib/python33/sublime_plugin.py", line 1692, in load_module
exec(compile(source, source_path, 'exec'), mod.__dict__)
File "/Users/kongxx/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/Lib/python33/sublime_plugin.py", line 1692, in load_module
exec(compile(source, source_path, 'exec'), mod.__dict__)
File "/Users/kongxx/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/Lib/python33/sublime_plugin.py", line 1692, in load_module
exec(compile(source, source_path, 'exec'), mod.__dict__)
File "/Users/kongxx/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/Lib/python33/sublime_plugin.py", line 1692, in load_module
exec(compile(source, source_path, 'exec'), mod.__dict__)
File "/Users/kongxx/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/Lib/python33/sublime_plugin.py", line 1692, in load_module
exec(compile(source, source_path, 'exec'), mod.__dict__)
File "/Users/kongxx/Library/Application Support/Sublime Text 3/Installed Packages/Package Control.sublime-package/package_control/deps/oscrypto/_openssl/_libcrypto_ctypes.py", line 688, in <module>
Package Control.package_control.deps.oscrypto._ffi.FFIEngineError: Error initializing ctypes
好像是因为Package Controler不支持openssl3导致的。
查看一下 /usr/local/lib/ibcrypto.dylib 文件,确实是链接到 xxx 上了,可能是在使用 homebrew 安装/升级什么软件导致的吧。
先重建一下链接,使用 openssl 1.x 版本,具体 ibcrypto.dylib 文件路径可能每个人系统上不一样,我这里是1.1.1k。
代码语言:javascript复制sudo ln -sf /usr/local/Cellar/openssl@1.1/1.1.1k/lib/libcrypto.dylib /usr/local/lib/
重新启动一下Sublime,再次使用 Package Control 就可以正常工作了。
这里我是更改了软链接也只是一个临时方案,最后还是希望 Package Control 新版本可以从根本上解决这个问题。