Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ST3/4] Package Control not working on macOS #1612

Closed
NicosKaralis opened this issue Dec 23, 2021 · 90 comments
Closed

[ST3/4] Package Control not working on macOS #1612

NicosKaralis opened this issue Dec 23, 2021 · 90 comments

Comments

@NicosKaralis
Copy link

NicosKaralis commented Dec 23, 2021

I tried instaling the Package Control via Command Palette and even manually but it was not working, after some debugging I found that the ctypes file for python3.3 are not being correctly loaded

This is the relevant part in the debug

Traceback (most recent call last):
  File "/Users/nicoskaralis/Library/Application Support/Sublime Text/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(0x7f876fc44440, EVP_PKEY_size): symbol not found
Here is the rest of the output log

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/nicoskaralis/Library/Application Support/Sublime Text/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/nicoskaralis/Library/Application Support/Sublime Text/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/nicoskaralis/Library/Application Support/Sublime Text/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/nicoskaralis/Library/Application Support/Sublime Text/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/nicoskaralis/Library/Application Support/Sublime Text/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/nicoskaralis/Library/Application Support/Sublime Text/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/nicoskaralis/Library/Application Support/Sublime Text/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/nicoskaralis/Library/Application Support/Sublime Text/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/nicoskaralis/Library/Application Support/Sublime Text/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/nicoskaralis/Library/Application Support/Sublime Text/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/nicoskaralis/Library/Application Support/Sublime Text/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(0x7f876fc44440, 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/nicoskaralis/Library/Application Support/Sublime Text/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/nicoskaralis/Library/Application Support/Sublime Text/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/nicoskaralis/Library/Application Support/Sublime Text/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/nicoskaralis/Library/Application Support/Sublime Text/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/nicoskaralis/Library/Application Support/Sublime Text/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/nicoskaralis/Library/Application Support/Sublime Text/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/nicoskaralis/Library/Application Support/Sublime Text/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/nicoskaralis/Library/Application Support/Sublime Text/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/nicoskaralis/Library/Application Support/Sublime Text/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/nicoskaralis/Library/Application Support/Sublime Text/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/nicoskaralis/Library/Application Support/Sublime Text/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

Any ideas on how to solve this?


Solution

Recommended solution for this issue is to manually install Package Control 4.0

Note

Whether Package Control 4.0 can be installed directly via Sublime Text's main menu depends on whether the related package file will be signed and uploaded to packagecontrol.io by @wbond.

Related package download link on packagecontrol.io is also out-dated for the very same reason.

Until then run the following code snippet from within ST's console

from urllib.request import urlretrieve;urlretrieve(url="https://github.com/wbond/package_control/releases/latest/download/Package.Control.sublime-package", filename=sublime.installed_packages_path() + '/Package Control.sublime-package')

or manually

  1. download latest release from https://github.com/wbond/package_control/releases
  2. rename it to Package Control.sublime-package
  3. place it to ST's Installed Packages directory
@ioctopuses
Copy link

ioctopuses commented Jan 2, 2022

I have the same problem with MacOS 12.1. In the past, the old MacOS has installed sublime text and upgraded to 12.1. This problem does not exist. OpenSSL version 2.8.3 can be used, but OpenSSL version 3.1.0 cannot be used

@df-a
Copy link

df-a commented Jan 24, 2022

Same problem here as well, on MacOS Monterrey, using OpenSSL v3.0.1

Traceback (most recent call last):
  File "/Users/aviftw/Library/Application Support/Sublime Text/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(0x2214322e0, EVP_PKEY_size): symbol not found

@rgaudin

This comment was marked as outdated.

@faelin

This comment was marked as outdated.

@ashu-tosh-kumar

This comment was marked as outdated.

@DeveloperKev
Copy link

DeveloperKev commented Aug 28, 2022

Running ln -sf /usr/local/Cellar/openssl@1.1/1.1.1o/lib/libcrypto.dylib /usr/local/lib/ solved the issue for me. Thanks.

if i install sublime text 4126 using official sublimetext, will i face this issues?
or while installing brew for the first time on mac will cause this on silicon mac?
i'm glad that u found a fix!

@faelin
Copy link

faelin commented Aug 28, 2022

if i install sublime text 4126 using official sublimetext, will i face this issues?
or while installing brew for the first time on mac will cause this on silicon mac?

Most likely, any installation on Big Sur or above will face this issue.

This issue stems from the fact that PackageControl, like many programs, still relies on older versions of OpenSSL (and is not compatible newer versions of the library). The version of the library libcrypto.dylib, which is linked from OpenSSL, is the crucial factor here. This library is not something provided by Sublime. In other words, the way you install Sublime probably doesn't matter (if the app came bundled with the appropriate library, then it wouldn't matter which method you use to install it, because the regular download doesn't use an installer wizard to pull down dependencies).

Probably, the best long term fix would be to bundle libcrypto.dylib with the PackageControl installation, to ensure correct versioning. Or to upgrade the dependency, to prevent potential SSL exploits in older versions.

EDIT: I was corrected, ST3 does ship with libcrypto, however the PackageControl implementation relies on the OS' installation instead, due to incompatibility with openssl 3.x (which is the version that ships with ST)

@DeveloperKev
Copy link

DeveloperKev commented Aug 29, 2022

but in the contents of the app directory, there are libcrypto.1.1.dylib as well as libssl.1.1.dylib , so is the issue with symlink?

@DeveloperKev
Copy link

or can it be done in this way, that sublime will only use the backdated library instead of making it the default one.

@deathaxe
Copy link
Collaborator

Please don't quote previous comments all over the time!

That said, Package Control uses oscrypto python package for HTTPS communication, because ST2 and first releases of ST3 didn't support SSL. oscrypto relies on ssl libraries from OS as the name says.

Package Control fails loading as openssl 3 ABI changed in ways which cause import errors, so needed modules are not loaded.

Otherwise using urllib downloader would probably fix the issue as it uses ST's bundled openssl libraries these days.

@nbrooks09
Copy link

I have the same issue. I am running MacOS Monterey 12.6 and a freshly installed version of Sublime Text 3 (Build 1426). When I install Package Control, it seems to install correctly but cannot be used. Package Control is not in my "ignored packages" as in some other users' issues. When I try to go into the Package Control settings - everything is greyed out (see below)

Screen Shot 2022-10-11 at 2 47 12 PM

@faelin
Copy link

faelin commented Oct 11, 2022

@nbrooks09 — the screenshot you've attached appears to be an unrelated problem. You have libcrypto installed correctly, however your installation is built for the x86 architecture used by Intel macs, while your Sublime console output says that you need the arm64 build (i.e. you have an M1 mac, and therefore need the M1-compatible libcrypto).

You may be able to solve this by replacing your Homebrew installation (if you use one) to the ARM-based Homebrew, or by manually building arm64 libcrypto, or you might be able to find an answer in this openssl github issue.

If someone with an M1 mac find a solution, please let us know!

@nbrooks09
Copy link

@faelin thanks for this!

I had the ARM-based Homebrew installed already.

What worked for me was to move libcrypto.dylib.

@FichteFoll

This comment was marked as outdated.

@deathaxe
Copy link
Collaborator

I'd be curious whether it stil happens in four-point-oh branch as it ships with latest oscrypto libs.

@FichteFoll
Copy link
Collaborator

I can try that out some time later if I don't forget. Is there anything else I need to consider before just cloning the repo into my Packages folder?

@deathaxe
Copy link
Collaborator

Basically not, I hope. I've tested migration from PC3.x to PC4 several times with success on Windows and Linux (Elementary OS). It should convert the library structure (move all to Lib) and should be ready after a single restart of ST.

The only limitation so far is libraries being reinstalled rather than updated when calling Satisfy Libraries as required PEP404 and PEP508 version comparison is not yet applied.

I use that branch in production without noticible issues however.

@FichteFoll
Copy link
Collaborator

FichteFoll commented Jan 15, 2023

Quick update, since my local setup became so broken I needed to update my packages and wasn't able to go around this anymore. Following are my steps and observations during the update process:

  1. Close ST.
  2. Removed Package Control from Installed Packages and clone into Packages (master branch!).
  3. Start ST, packages are updated (=> the problem appears to be fixed in master already)
  4. Close ST.
  5. Checkout four-point-oh branch.
  6. Start ST, wait for the PC popup asking me to restart, close ST.
  7. Start ST, wait for the PC popup asking me to restart, close ST.
  8. Start ST, no popup anymore and also almost no tracebacks in the console anymore except for this one:
Traceback (most recent call last):
  File "/opt/sublime_text/Lib/python33/sublime_plugin.py", line 528, in on_api_ready
    plc()
  File "/home/fichte/.config/sublime-text/Installed Packages/SublimeLinter.sublime-package/sublime_linter.py", line 54, in plugin_loaded
    package_control.events.install('SublimeLinter') or
AttributeError: 'module' object has no attribute 'events'

There should probably be a fake module for compatibility after the update here.
There seems to be one already but not sure why SL doesn't have it.
SL doesn't import package_control.events. Raising upstream.
SublimeLinter/SublimeLinter#1889

>>> import package_control
>>> import package_control.events
>>> package_control.events
<module 'package_control.events' from '/home/fichte/.config/sublime-text/Packages/Package Control/package_control/events.py'>
>>> package_control.events.install
<function install at 0x7fa533e19ee0>
Python 3.3>>> import package_control
Python 3.3>>> import package_control.events
Python 3.3>>> package_control.events.install
<function install at 0x7f60cdf43b00>

@deathaxe deathaxe added this to the Package Control 4.0 milestone Mar 14, 2023
@CodeByZach

This comment was marked as outdated.

@Arbior

This comment was marked as outdated.

@deathaxe
Copy link
Collaborator

deathaxe commented Jul 7, 2023

For those who having trouble due to OpenSSL and some time for testing could checkout PC 4.0-beta.

To do so:

  1. create a backup of your ST profile including all packages in case you want or need to roll back!

  2. Open Command Palette and call Preferences: Package Control Settings

  3. add "Package Control" to the list of "install_prereleases" as followed:

     "install_prereleases":
     [
     	"Package Control",
     ],
    
  4. Open Command Palette and call Package Control: Update Package

  5. Select "Package Control" and hit enter

Package Control 4.0 uses latest oscrypto library which should support OpenSSL 3.

Warning

Make a backup of your data!

PC4.0 converts dependencies to libraries and installs them to "Data\Lib\python3.x" folder.

@inferiorhumanorgans
Copy link

The solution put forth by @faelin worked for me. I ended up running the following: ln -sf /usr/local/Cellar/openssl@1.1/1.1.1u/lib/libcrypto.dylib /usr/local/lib/

@faelin Thank you!!

This is a bad idea as it will break anything that expects the default library to be OpenSSL 3.

@inferiorhumanorgans
Copy link

 "install_prereleases":
 [
 	"Package Control",
 ],

Is there any way to bootstrap this?

@deathaxe
Copy link
Collaborator

deathaxe commented Jul 14, 2023

Package Control will be uppraded next time package update is triggered, either by automatic updates at ST startup or by manually calling "Package Control: Upgrade All Packages/Overwrite All" via Command Palette.

In case PC3.x is not working, you can

  1. download https://github.com/wbond/package_control/releases/download/4.0.0-beta8/Package.Control.sublime-package
  2. call Main Menu > Preferences > Browse Packages...
  3. navigate to to ../Installed Packages
  4. move downloaded package into Installed Packages and rename it to Package Control.sublime-package (replace the . by ).

@brian-farrell
Copy link

@deathaxe The file that gets downloaded in your instructions above is named 'Package.Control.sublime-package'

I found that I needed to rename the file to 'Package Control.sublime-package' in order for this fix to work. (I changed the first Period, after the word 'Package' to a space)

Also needed to restart ST3.

Package Control appears to be working again as expected after this.

@inferiorhumanorgans
Copy link

Package Control will be uppraded next time package update is triggered, either by automatic updates at ST startup or by manually calling "Package Control: Upgrade All Packages/Overwrite All" via Command Palette.

In case PC3.x is not working, you can

1. download https://github.com/wbond/package_control/releases/download/4.0.0-beta2/Package.Control.sublime-package

2. call _Main Menu > Preferences > Browse Packages..._

3. navigate to to _../Installed Packages_

4. move _Package Control.sublime-package_ to ST's _Installed Packages_

Right, but that only works if PC has been installed and bootstrapped. On a clean install these steps don't work.

@NazarK
Copy link

NazarK commented Oct 19, 2023

Thank you @faelin ! I got it working after reading this #1612 (comment)
I just had to download the latest package, which is https://github.com/wbond/package_control/releases/tag/4.0.0-beta8 Then place it manually in the Installed Packages directory. Works :)

Did you follow this? This works for most people, including me.

Yeah. Sadly it didn't help. I have both openssl1.1 and openssl3 installed on my mac.

just run:
brew link openssl@1.1
and restart sublime, it fixed it for me

@hyrious
Copy link

hyrious commented Oct 19, 2023

I have installed Package Control v4.0.0-beta8 on my macOS 14 with Sublime Text 4 with OpenSSL 3. It works perfectly.

$ openssl version
OpenSSL 3.1.3 19 Sep 2023 (Library: OpenSSL 3.1.3 19 Sep 2023)

$ subl -v
Sublime Text Build 4152

$ sw_vers
ProductName:		macOS
ProductVersion:		14.0
BuildVersion:		23A344

If you are stuck at the place where Package Control 3.0 cannot run to update itself, you can do either of the 2 steps:

@Hoatzin
Copy link

Hoatzin commented Oct 19, 2023

So I was getting the plugin_host-3.3 has exited unexpectedly error. Manually going through plugins and disabling them didn't do anything, so I archived my Sublime Text folder in the Application Support, and it opened without errors. I told it to install the Package Control automatically, and it did, but upon restarting the error came back. So I manually downloaded the beta, but when I started that one it said plugin_host-3.8 has exited unexpectedly...

I tried to force openssl 1.1 via brew but that didn't seem to alter anything or allow me to interact with Package Control menus, to sort or permute lines, to shrink or enlarge text and so on.

I am some updates behind on the MacOS, so I am gonna try that next.

@roubachof
Copy link

Don't forget to rename Package.Control.sublime-package to Package Control.sublime-package (whitespace between package and control) or you will end up with a message saying it cannot find the 'Package' package in console view.

@legendbb
Copy link

I just got my issue resolved by deleting "0_package_control_loader.sublime-package" and "Package Control.sublime-package" from the Install Packages folder.
And reinstall from cmd + ctrl + p > install package control.
macOS 13.5.2, sublime 4152

@jama211
Copy link

jama211 commented Nov 20, 2023

Why has this not been fixed within the program? Why do I have to download the latest version from here, name it correctly (by removing the dot between Package.Control) instead of it working inside sublime? It's been months...

@deathaxe
Copy link
Collaborator

There are 2 major reasons:

  1. The fix is part of the next major release 4.0, which mainly targets dropping ST2/python2 support and adding python 3.8 support. Some fine tuning is still needed to fully support dependencies on python 3.8 plugin_host. Actually, mainly a "channel" with valid metadata is the main stopper, next to support for installing python packages like pip does. But that's maybe a part for a future release anyway.
  2. Only Will is able to sign a package and upload it to packagecontrol.io, so it can directly be installed from ST's main menu. It currently seems his priorities shifted.

Until then, the only chance to ship the package for download is via Github releases, which do NOT support spaces in file names. They are replaced by periods. That's why you need to rename it.

It would be easy to file a final 4.0.0 version, soon, but would still leave those behind whose systems refuses to run PC 3.x

@dak1m
Copy link

dak1m commented Nov 21, 2023

Running ln -sf /usr/local/Cellar/openssl@1.1/1.1.1o/lib/libcrypto.dylib /usr/local/lib/ solved the issue for me. Thanks.

if i install sublime text 4126 using official sublimetext, will i face this issues? or while installing brew for the first time on mac will cause this on silicon mac? i'm glad that u found a fix!

libcrypto

good to me

@plocket
Copy link

plocket commented Nov 23, 2023

I wonder if it'd be useful to edit the original question to add the currently helpful answer(s?) to it so it (they?) don't get lost in the rest of the comments until various fixes come through. Just not sure how else to help people find the info. Took me a while to dig through here to find the two pieces that worked for me. Thank you for the help!

@deathaxe
Copy link
Collaborator

deathaxe commented Dec 2, 2023

Fixed by 4.0

Note: Whether Package Control 4.0 can be installed directly via Sublime Text's main menu depends on whether the related package file will be signed and uploaded to packagecontrol.io by @wbond.

Until then you may still need to

  1. download latest release from https://github.com/wbond/package_control/releases
  2. rename it to Package Control.sublime-package
  3. place it to ST's Installed Packages directory

as the beta builds before.

@deathaxe deathaxe closed this as completed Dec 2, 2023
@plocket
Copy link

plocket commented Dec 3, 2023

Where should we check to find out if the related package file is signed and uploaded to packagecontrol.io, @deathaxe? That way, Future People will know where to look to find out if they can start installing via the main menu again.

@deathaxe
Copy link
Collaborator

deathaxe commented Dec 3, 2023

The link at https://packagecontrol.io/installation would point to the PC 4.0 binary, I guess.

The official release, which is also downloaded by ST's install helper is located at https://packagecontrol.io/Package%20Control.sublime-package

Package Control 3.4.1 Metadata

Name: Package Control.sublime-package
Größe: 471460 Bytes (460 KiB)
SHA256: 817937144c34c84c88cd43b85318b2656f9c3fac02f8f72cbc18360b2c26d139

Package Control 4.0.0 would differ.

I don't want to post the details to avoid confusion with possible future releases.

@rchl
Copy link
Contributor

rchl commented Dec 3, 2023

Well, after installing 3.4.1 from the main menu, it will still update itself to 4.0 on next ST start (or sometime later), doesn't it? So effectively it's gonna be installed already anyway.

@deathaxe I'm not sure if that part is clear from your messaging here and in release notes.

@deathaxe
Copy link
Collaborator

deathaxe commented Dec 3, 2023

But this won't help those - especially MacOS users, who have already run into Package Control not working issue due to openssl3 being linked.

Those won't benefit from auto-update from 3.4.1 to 4.0. They must take the hard way and install manually from this repo's releases page.

@leocxy
Copy link

leocxy commented Dec 5, 2023

Fixed by 4.0

Note: Whether Package Control 4.0 can be installed directly via Sublime Text's main menu depends on whether the related package file will be signed and uploaded to packagecontrol.io by @wbond.

Until then you may still need to

1. download latest release from https://github.com/wbond/package_control/releases

2. rename it to `Package Control.sublime-package`

3. place it to ST's _Installed Packages_ directory

as the beta builds before.

It work for me.
I am using a Macbook with an M2 Chip.

I downloaded the sublime 4 from the official site (Build 4169)
Then I tried to install the Package Control. It shows a successful message, but I can't see it.

If you close the ST totally and re-open it, you can see some error messages from the console. (View -> Show Console)

Now you can open the installed packages folder.

  1. Settings -> Browser packages. This will bring you to the "Packages" folder, the "Installed Packages" folder sitting at the SAME level of the "Packages" folder.
  2. Go to the "Installed Packages" folder, and delete the "Package Control.sublime-package" binary file
  3. Download the new release from the above release link
  4. Rename and move it back to the "Installed Packages" folder.

@plocket
Copy link

plocket commented Dec 5, 2023

But this won't help those - especially MacOS users, who have already run into Package Control not working issue due to openssl3 being linked.

Just checking if I understand correctly:

  1. This isn't going to be the situation forever. This is fixed already, the fix is just not released yet until package control switches to 4.0.
  2. There's no way to check what version package control is using before downloading it, but after you download it you can check its meta data (not sure where to find that) to see what version it's using. If it's using the wrong version, you go through the procedures outlined above.

@deathaxe
Copy link
Collaborator

deathaxe commented Dec 5, 2023

This isn't going to be the situation forever.

Depends on the original author of this package who is the only one with access to packagecontrol.io

after you download it you can check its meta data ...

You can check the version by...

  1. Open Command Palette
  2. Call "Package Control: List Packages"
  3. Enter "Package Control"

The version is listed in the details part under package name.

If it's using the wrong version, you go through the procedures outlined above.

Unfortunatelly, correct.

@Luka2552
Copy link

Fixed by 4.0
Note: Whether Package Control 4.0 can be installed directly via Sublime Text's main menu depends on whether the related package file will be signed and uploaded to packagecontrol.io by @wbond.
Until then you may still need to

1. download latest release from https://github.com/wbond/package_control/releases

2. rename it to `Package Control.sublime-package`

3. place it to ST's _Installed Packages_ directory

as the beta builds before.

It work for me. I am using a Macbook with an M2 Chip.

I downloaded the sublime 4 from the official site (Build 4169) Then I tried to install the Package Control. It shows a successful message, but I can't see it.

If you close the ST totally and re-open it, you can see some error messages from the console. (View -> Show Console)

Now you can open the installed packages folder.

1. Settings -> Browser packages. This will bring you to the "Packages" folder, the "Installed Packages" folder sitting at the SAME level of the "Packages" folder.

2. Go to the "Installed Packages" folder, and delete the "Package Control.sublime-package" binary file

3. Download the new release from the above release link

4. Rename and move it back to the "Installed Packages" folder.

Thank you very much! This worked for me!

Sublime Text 4169

macOS Big Sur 11.6

@KvMadan
Copy link

KvMadan commented Dec 28, 2023

Thank you!
Above solution worked for
Mac 14.2
ST 4169

@raffeyang
Copy link

Doesn't work on intel macOS.

@leonson
Copy link

leonson commented Jan 3, 2024

I just used the solution for my Intel Macbook and unblocked. I am using Sublime Text 4 Stable Channel, Build 4169. My processor is 2.3 GHz Quad-Core Intel Core i75.

The installation page's Manual section step 3 does not have the most recent release, thus manually downloading there did not help. The solution here has the right link, I would suggest either update the link on installation page's manual session, or if there is a reason not to do so, add a link(on installation page) to this issue.

In my console log I found following error message which is equivalent to this issue's:

Traceback (most recent call last):
  File "/Users/leonson/Library/Application Support/Sublime Text/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(0x7ff919620a40, EVP_PKEY_size): symbol not found

@deathaxe
Copy link
Collaborator

deathaxe commented Jan 3, 2024

The original author - quite inactive recently - is the only one with write access to packagecontrol.io and thus the only one who could upload latest release there, which would also be required for ST's Package Control installer to directly install it.

The error message indicates Package Control 3.x to still be loaded! PC4.0 would run on python 3.8.

Maybe refer to "Solution" section provided in OP?

Repository owner locked as resolved and limited conversation to collaborators Jan 3, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests