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

[Bug]: libmd.so.0 not available for sublime-text. Ubuntu 20.04 Sublime 4166 #47

Closed
dagbj opened this issue Nov 22, 2023 · 24 comments · Fixed by #50
Closed

[Bug]: libmd.so.0 not available for sublime-text. Ubuntu 20.04 Sublime 4166 #47

dagbj opened this issue Nov 22, 2023 · 24 comments · Fixed by #50
Labels

Comments

@dagbj
Copy link

dagbj commented Nov 22, 2023

What happened?

Sublime-text does not start. Starting from command line gives this error:
$ subl /snap/sublime-text/130/opt/sublime_text/sublime_text: error while loading shared libraries: libmd.so.0: cannot open shared object file: No such file or directory
I used sublime just the other day.

Digging around this problem, I find some reports that might be relevant:
https://forum.snapcraft.io/t/classic-base-core22-snap-not-finding-libraries-from-base/35192

Trying the test specified there I do not get much further:
$ snap run --shell subl error: cannot find current revision for snap subl: readlink /snap/subl/current: no such file or directory
Please note that I'm running on Ubuntu 20.04. Upgrading the OS is not possible for me. I did a remove and install. Which did not help.

What should have happened?

I should have got a running sublime text.

Output of snap info $snap_name

$ snap info sublime-text
name:      sublime-text
summary:   A sophisticated text editor for code, markup and prose.
publisher: Snapcrafters✪
store-url: https://snapcraft.io/sublime-text
contact:   https://github.com/snapcrafters/sublime-text/issues
license:   Proprietary
description: |
  Sublime Text is a powerful multi-platform text editor with a clean, modern user interface.
  Bringing wide support for programming languages, extensions, syntax-based features and many other
  useful features alongside low resource usage, Sublime Text proves itself to be a very competent
  solution for a vast set of environments and applications.
  The software may be downloaded and evaluated for free, however a license must be purchased for
  continued use.
  
    **Authors**
  
  This snap is maintained by the Snapcrafters community, and is not necessarily endorsed or
  officially maintained by the upstream developers.
commands:
  - sublime-text.subl
snap-id:      2kOIsSRmQ7zjpIxzZDpoXaZOVejqaGOT
tracking:     latest/stable
refresh-date: today at 15:57 CET
channels:
  latest/stable:    4166 2023-11-22 (130) 62MB classic
  latest/candidate: ↑                          
  latest/beta:      ↑                          
  latest/edge:      4166 2023-11-22 (130) 62MB classic
installed:          4166            (130) 62MB classic

Output of snap connections $snap_name

$ snap connections sublime-text

Output of snap version

$ snap version
snap    2.60.4
snapd   2.60.4
series  16
ubuntu  20.04
kernel  5.15.0-88-generic

Relevant log output

After boot, just some messages regarding JFS and btrfs

Teminal output of app

$ subl
/snap/sublime-text/130/opt/sublime_text/sublime_text: error while loading shared libraries: libmd.so.0: cannot open shared object file: No such file or directory
@dagbj dagbj added the bug label Nov 22, 2023
@nmondal
Copy link

nmondal commented Nov 22, 2023

Facing the exact same problem.

@raimopinding
Copy link

Same here...

@sarathkumar006
Copy link

sarathkumar006 commented Nov 23, 2023

me too facing this issue.i uninstalled it with snap. and followed this steps. sublime working for me
(NOTE: unsaved and opened files in sublime retained when its reinstalled)
https://www.sublimetext.com/docs/linux_repositories.html

@raimopinding
Copy link

Thank you sarathkumar006, i did the same and it worked and yes, unsaved files are not lost.

@tahsinkose
Copy link

If you want to keep using sublime-text with snap, you can revert to the previous stable version of it. Do the following:

  1. snap list sublime-text --all to see the versions you have locally.
  2. sudo snap revert sublime-text --revision <an_older_revision> -- you need to specify the number from Rev field as <an_older_revision>, not from Version field.

@fuad-asim-pv
Copy link

me too facing this issue.i uninstalled it with snap. and followed this steps. sublime working for me (NOTE: unsaved and opened files in sublime retained when its reinstalled) https://www.sublimetext.com/docs/linux_repositories.html

This worked for me on ubuntu 18.04.

If you want to keep using sublime-text with snap, you can revert to the previous stable version of it. Do the following:

1. `snap list sublime-text --all` to see the versions you have locally.

2. `sudo snap revert sublime-text --revision <an_older_revision>` -- you need to specify the number from `Rev` field as `<an_older_revision>`, not from `Version` field.

This did not as i didn't have any older snap versions installed and snap info sublime-text also didn't show any older versions available.

@om26er
Copy link
Member

om26er commented Nov 23, 2023

I think we will revert the latest revision

@om26er
Copy link
Member

om26er commented Nov 23, 2023

It would be interesting to check if installing libmd0 on the host fixes the issue? sudo apt-get -y install libmd0

@dafcioo
Copy link

dafcioo commented Nov 23, 2023

sudo apt-get -y install libmd0

Ubuntu 20.04, it leads to another errors:

/snap/sublime-text/130/opt/sublime_text/sublime_text: /lib/x86_64-linux-gnu/libc.so.6: version GLIBC_2.33' not found (required by /snap/sublime-text/130/usr/lib/x86_64-linux-gnu/libX11.so.6) /snap/sublime-text/130/opt/sublime_text/sublime_text: /lib/x86_64-linux-gnu/libc.so.6: version GLIBC_2.34' not found (required by /snap/sublime-text/130/usr/lib/x86_64-linux-gnu/libX11.so.6)
/snap/sublime-text/130/opt/sublime_text/sublime_text: /lib/x86_64-linux-gnu/libc.so.6: version GLIBC_2.33' not found (required by /snap/sublime-text/130/usr/lib/x86_64-linux-gnu/libXau.so.6) /snap/sublime-text/130/opt/sublime_text/sublime_text: /lib/x86_64-linux-gnu/libc.so.6: version GLIBC_2.33' not found (required by /snap/sublime-text/130/usr/lib/x86_64-linux-gnu/libbsd.so.0)

Reverting to the previous revision 122 works for me:
sudo snap revert sublime-text --revision 122

@om26er
Copy link
Member

om26er commented Nov 23, 2023

I have a PR up for a revert #49 -- we will figure out a proper fix afterwards

popey added a commit to popey/sublime-text that referenced this issue Nov 23, 2023
This stages `libmd0` which is required by Sublime text 4166
@popey popey closed this as completed in #50 Nov 23, 2023
popey added a commit that referenced this issue Nov 23, 2023
Fix: Add libmd0 to resolve #47
@popey
Copy link
Contributor

popey commented Nov 23, 2023

Thanks for reporting this issue. A new build of sublime-text is now in the candidate channel which aims to fix this. Could anyone who has been affected by this please test.

snap refresh sublime-text --candidate

You'll get revision 132 on x86 and 133 on arm computers.

If that's resolved, we'll move it to the stable channel. Thanks again, and apologies for the inconvenience!

@dafcioo
Copy link

dafcioo commented Nov 23, 2023

Thanks for reporting this issue. A new build of sublime-text is now in the candidate channel which aims to fix this. Could anyone who has been affected by this please test.

snap refresh sublime-text --candidate

You'll get revision 132 on x86 and 133 on arm computers.

If that's resolved, we'll move it to the stable channel. Thanks again, and apologies for the inconvenience!

On my Ubuntu 20.04 it does not, unfortunately. Looks like libmd0 needs newer GLIBC (I have 2.31 on my machine):

/snap/sublime-text/132/opt/sublime_text/sublime_text: /lib/x86_64-linux-gnu/libc.so.6: version GLIBC_2.33' not found (required by /snap/sublime-text/132/usr/lib/x86_64-linux-gnu/libX11.so.6) /snap/sublime-text/132/opt/sublime_text/sublime_text: /lib/x86_64-linux-gnu/libc.so.6: version GLIBC_2.34' not found (required by /snap/sublime-text/132/usr/lib/x86_64-linux-gnu/libX11.so.6)
/snap/sublime-text/132/opt/sublime_text/sublime_text: /lib/x86_64-linux-gnu/libc.so.6: version GLIBC_2.33' not found (required by /snap/sublime-text/132/usr/lib/x86_64-linux-gnu/libXau.so.6) /snap/sublime-text/132/opt/sublime_text/sublime_text: /lib/x86_64-linux-gnu/libc.so.6: version GLIBC_2.33' not found (required by /snap/sublime-text/132/usr/lib/x86_64-linux-gnu/libbsd.so.0)
/snap/sublime-text/132/opt/sublime_text/sublime_text: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.33' not found (required by /snap/sublime-text/132/usr/lib/x86_64-linux-gnu/libmd.so.0)

@popey
Copy link
Contributor

popey commented Nov 23, 2023

@dafcioo Thanks. That makes no sense 🤯 - how are you running sublime-text? Can you /snap/bin/sublime-text.subl

(It looks like you're running the binary directly from deep within the compressed snap itself, which isn't supported (or desirable, as you have discovered) way to launch applications)

@popey popey reopened this Nov 23, 2023
@dafcioo
Copy link

dafcioo commented Nov 23, 2023

@dafcioo Thanks. That makes no sense 🤯 - how are you running sublime-text? Can you /snap/bin/sublime-text.subl

When refreshed to candidate revision (132):

$ /snap/bin/sublime-text.subl
/snap/sublime-text/132/opt/sublime_text/sublime_text: /lib/x86_64-linux-gnu/libc.so.6: version GLIBC_2.33' not found (required by /snap/sublime-text/132/usr/lib/x86_64-linux-gnu/libX11.so.6) /snap/sublime-text/132/opt/sublime_text/sublime_text: /lib/x86_64-linux-gnu/libc.so.6: version GLIBC_2.34' not found (required by /snap/sublime-text/132/usr/lib/x86_64-linux-gnu/libX11.so.6)
/snap/sublime-text/132/opt/sublime_text/sublime_text: /lib/x86_64-linux-gnu/libc.so.6: version GLIBC_2.33' not found (required by /snap/sublime-text/132/usr/lib/x86_64-linux-gnu/libXau.so.6) /snap/sublime-text/132/opt/sublime_text/sublime_text: /lib/x86_64-linux-gnu/libc.so.6: version GLIBC_2.33' not found (required by /snap/sublime-text/132/usr/lib/x86_64-linux-gnu/libbsd.so.0)
/snap/sublime-text/132/opt/sublime_text/sublime_text: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.33' not found (required by /snap/sublime-text/132/usr/lib/x86_64-linux-gnu/libmd.so.0)

After reverting back to 122 it just works.

$ ls -la /snap/bin/sublime-text.subl
lrwxrwxrwx 1 root root 13 lis 23 11:41 /snap/bin/sublime-text.subl -> /usr/bin/snap

$ apt-cache policy libc6
libc6:
Installed: 2.31-0ubuntu9.12
Candidate: 2.31-0ubuntu9.12
Version table:
*** 2.31-0ubuntu9.12 500
500 http://pl.archive.ubuntu.com/ubuntu focal-updates/main amd64 Packages
100 /var/lib/dpkg/status
2.31-0ubuntu9.7 500
500 http://security.ubuntu.com/ubuntu focal-security/main amd64 Packages
2.31-0ubuntu9 500
500 http://pl.archive.ubuntu.com/ubuntu focal/main amd64 Packages

@popey
Copy link
Contributor

popey commented Nov 23, 2023

Ok, I've pushed 4152 (the previous, working release) to the stable channel while we debug this.

@popey
Copy link
Contributor

popey commented Nov 23, 2023

Ok, I have reproduced this issue on a clean install of 20.04 with the snap from candidate.

@sergiusens
Copy link

Just to fill in, on:

sergiusens@cuivienen:~$ cat /etc/os-release 
PRETTY_NAME="Ubuntu 23.10"
NAME="Ubuntu"
VERSION_ID="23.10"
VERSION="23.10 (Mantic Minotaur)"
VERSION_CODENAME=mantic
ID=ubuntu
ID_LIKE=debian
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
UBUNTU_CODENAME=mantic
LOGO=ubuntu-logo

Both, rev 4152 and 4166 work fine

sergiusens@cuivienen:~$ snap install sublime-text --classic
sublime-text 4152 from Snapcrafters✪ installed
sergiusens@cuivienen:~$ sublime-text.subl 
sergiusens@cuivienen:~$ snap refresh sublime-text --edge
sublime-text (edge) 4166 from Snapcrafters✪ refreshed
sergiusens@cuivienen:~$ sublime-text.subl 
sergiusens@cuivienen:~$

@popey
Copy link
Contributor

popey commented Nov 23, 2023

Locally, I have built a snap of 4166 after reverting the change to using core22, so my build uses the older core20 configuration. This works fine in Ubuntu 20.04, and 23.10 where I've tested it. I've built it again in launchpad, and published to a short-lived test branch.

Please, @dafcioo (and any others affected) if you have a moment, please test this build.

snap refresh sublime-text --channel=latest/candidate/fix-bug-47

Many thanks.

@8uben
Copy link

8uben commented Nov 23, 2023

@popey, i've done:

~$ snap refresh sublime-text --channel=latest/candidate/fix-bug-47
sublime-text (candidate/fix-bug-47) 4166 от Snapcrafters✪ обновлён
~$ subl -v
Sublime Text Build 4166

after, i ran sublime-text.

Thank you!

P.S i have Kubuntu 20.04

@dafcioo
Copy link

dafcioo commented Nov 23, 2023

Locally, I have built a snap of 4166 after reverting the change to using core22, so my build uses the older core20 configuration. This works fine in Ubuntu 20.04, and 23.10 where I've tested it. I've built it again in launchpad, and published to a short-lived test branch.

Please, @dafcioo (and any others affected) if you have a moment, please test this build.

snap refresh sublime-text --channel=latest/candidate/fix-bug-47

Many thanks.

Well done! Works for me :)

$ snap refresh sublime-text --channel=latest/candidate/fix-bug-47
sublime-text (candidate/fix-bug-47) 4166 from Snapcrafters✪ refreshed
$ /snap/bin/sublime-text.subl
$ subl -v
Sublime Text Build 4166

@popey
Copy link
Contributor

popey commented Nov 23, 2023

Perfect, thanks for confirming. I've promoted revisions 134 (amd64) and 135 (arm64) to latest/stable, and closed all other channels for the moment—apologies for the drama. I'll start a new issue/thread to discuss how to resolve this.

@popey popey closed this as completed Nov 23, 2023
@raphapaulino
Copy link

snap refresh sublime-text --candidate

It worked for me, thank you @popey !

@nmondal
Copy link

nmondal commented Nov 24, 2023

Somehow w/o doing anything my sublime text started working. Not sure how the magic happened, but it happened.
Thank you everyone. Appreciated.

@popey
Copy link
Contributor

popey commented Nov 24, 2023

@nmondal The 🪄 Magic 🪄 of automatic updates! 👯

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.