macOS 13.6上Sublime無法使用Package Control問題
最近升級系統(tǒng)重裝Sublime后發(fā)現(xiàn)Package Control不能使用笙以,在Settings -> Package Control下輸入Install沒有任何提示凤跑。
然后使用 CTRL + ` 或者 View -> Show Console 查看日志茂嗓,看到打印了一堆錯誤晤锥,內(nèi)容如下:
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導(dǎo)致的颂郎。
查看一下 /usr/local/lib/ibcrypto.dylib 文件膘茎,確實是鏈接到 xxx 上了宋彼,可能是在使用 homebrew 安裝/升級什么軟件導(dǎo)致的吧。
先重建一下鏈接造锅,使用 openssl 1.x 版本撼唾,具體 ibcrypto.dylib 文件路徑可能每個人系統(tǒng)上不一樣,我這里是1.1.1k哥蔚。
sudo ln -sf /usr/local/Cellar/openssl@1.1/1.1.1k/lib/libcrypto.dylib /usr/local/lib/
重新啟動一下Sublime倒谷,再次使用 Package Control 就可以正常工作了。
這里我是更改了軟鏈接也只是一個臨時方案糙箍,最后還是希望 Package Control 新版本可以從根本上解決這個問題渤愁。