snapcrafters / obs-studio

This is a community-supported modified build of OBS Studio.
https://snapcraft.io/obs-studio
111 stars 37 forks source link

Will not open on RHEL 7.5 after update -- libQt5Core.so.5 not found #115

Closed Stwerp closed 2 years ago

Stwerp commented 3 years ago

I'm new to snaps. obs-studio was formerly working sometime last fall. I'm guessing my snaps updated automatically.

When running obs-studio, it will crash with the following message:

/snap/obs-studio/1195/usr/bin/obs: error while loading shared libraries: libQt5Core.so.5: cannot open shared object file: No such file or directory

Scrubbed output of uname -a

Linux USER.HOSTNAME 3.10.0-1160.15.2.el7.x86_64 #1 SMP Thu Jan 21 16:15:07 EST 2021 x86_64 x86_64 x86_64 GNU/Linux

I am guessing that a recent QT5 update within the snap is triggering this and may need a newer kernel.

IF this cannot be fixed unless I upgrade --- not an option for me, as this isn't "my" box --- then how is it possible to downgrade and install former snaps? I can't find that option.

Top of qtdiag

Qt 5.12.5 (x86_64-little_endian-lp64 shared (dynamic) release build; by GCC 7.3.0) on "xcb" OS: Red Hat Enterprise Linux [linux version 3.10.0-1160.15.2.el7.x86_64] Architecture: x86_64; features: SSE2 SSE3 SSSE3 SSE4.1 SSE4.2 AVX AVX2 RTM HLE

Environment: QTDIR="/usr/lib64/qt-3.3" QTINC="/usr/lib64/qt-3.3/include" QTLIB="/usr/lib64/qt-3.3/lib" QT_GRAPHICSSYSTEM_CHECKED="1" QT_PLUGIN_PATH="/usr/lib64/kde4/plugins:/usr/lib/kde4/plugins:/home/USER/.kde/lib64/kde4/plugins/:/usr/lib64/kde4/plugins/" ...

Stwerp commented 3 years ago

Poking around some snap stuff, I found that

sudo snap revert obs-studio --revision 1141

reverted to the older version I had in /var/lib/snapd/snap/obs-studio. After running this, obs-studio opened once again. This issue is a problem that is happening between the 1141 revision and the 1195 revision.

I guess, the other question now, is how do revisions "disappear", and how long can I keep this one on my system?

flexiondotorg commented 3 years ago

How are you launching the snap exactly?

Stwerp commented 3 years ago

How are you launching the snap exactly?

I'm running it from a terminal. Specifically a Konsole term. obs-studio is symlinked to /var/lib/snapd/snap/bin/obs-studio (which itself is linked to /usr/bin/snap).

At one point I believe I did try launching it from krunner, or whatever's KDE's quick-launch/"spotlight" bar is and the snap failed silently. I can try launching it another way if you have suggestions that would help.

I'm away right now, but will get physical access next week and can give you the full output of printenv. Currently from a remote terminal, I'm seeing:

$ printenv | grep QT QTDIR=/usr/lib64/qt-3.3 QTINC=/usr/lib64/qt-3.3/include QT_GRAPHICSSYSTEM_CHECKED=1 QTLIB=/usr/lib64/qt-3.3/lib QT_PLUGIN_PATH=/usr/lib64/kde4/plugins:/usr/lib/kde4/plugins

flexiondotorg commented 3 years ago

I'm running it from a terminal. Specifically a Konsole term. obs-studio is symlinked to /var/lib/snapd/snap/bin/obs-studio (which itself is linked to /usr/bin/snap).

That is your problem 🙂 You are invoking the snap outside of its containment, therefore the binaries in the snap are trying to us libraries on your host, not the libraries that the snap bundles.

You should use /snap/bin/obs-studio or snap run obs-studio to executute the OBS snap, or the OBS Studio desktop file that the snap exposes in your menus :+1:

Stwerp commented 3 years ago

You should use /snap/bin/obs-studio or snap run obs-studio to executute the OBS snap, or the OBS Studio desktop file that the snap exposes in your menus 👍

D'oh! Well, that makes more sense. Like I said, I'm new to snaps and don't quite understand the mental model of it! I'll test Monday, and leave a comment next week. Thanks!

Related: I found out about the OBS snap from this site [[https://snapcraft.io/install/obs-studio/rhel]]. The last line lists to install the snap as sudo snap install obs-studio. Where I went wrong, was just assuming it operated like apt or yum and that the last part was the console command to run!

Stwerp commented 3 years ago

Unfortunately, this does not fix it.

I refreshed to the latest snap with sudo snap refresh obs-studio and now see

$ snap list --all obs-studio Name Version Rev Tracking Publisher Notes obs-studio 26.0.2 1141 latest/stable snapcrafters disabled obs-studio 26.1.2-35-gbb6b1e53f 1195 latest/stable snapcrafters -

However, attempting to run from either command you listed will still fail in the same way.

$ /snap/bin/obs-studio /snap/obs-studio/1195/usr/bin/obs: error while loading shared libraries: libQt5Core.so.5: cannot open shared object file: No such file or directory $ snap run obs-studio /snap/obs-studio/1195/usr/bin/obs: error while loading shared libraries: libQt5Core.so.5: cannot open shared object file: No such file or directory

Likewise, from the launcher menu and using the desktop shortcuts, the obs-studio link fails silently.

flexiondotorg commented 3 years ago

Please refresh the snap from the edge channel, retest and let me know if it works :+1:

snap refresh obs-studio --edge
Stwerp commented 3 years ago

I ran the command, it upgraded to 1249, and still fails with the same error message. I tried removing and then re-installing obs-studio, and it was the same problem and I nuked my working 1141 revision in the process. Oops.

Stwerp commented 2 years ago

Needing obs, today I tried manually installing some older version of obs-studio locally and it seems this is a larger problem with snap, and not obs-studio specifically. When running multipass I am finding the same QT errors.

A bit of looking, and its a kernel issue and I am out-of-luck. I don't know of any way to revert to the rev 1149 that was working at this point.

https://github.com/canonical/multipass/issues/2178

I'll leave this open in case you know of a way to download specific older snaps, but otherwise feel free to close. It sounds like the only way to resolve this is a kernel upgrade.

Stwerp commented 2 years ago

And with this last bit, I'll close it. For anyone else wishing to run obs-studio on an ancient distribution like RHEL 7 (woe be to us banished to the corporate box o' linux), the following worked for me.

Install the RPM fusion repository via https://rpmfusion.org/Configuration

Then install the obs-studio package found here https://centos.pkgs.org/7/rpmfusion-free-updates-x86_64/obs-studio-26.1.0-1.el7.x86_64.rpm.html or via # yum install obs-studio. I just tested a recording, and everything seems to work.