Snap apps giving "error while loading shared libraries" and "cannot open shared object file: No such file or directory" when opened - fedora

Some snap apps (namely discord and telegram-desktop), stopped opening when I turned my laptop on this morning (Fedora 31 64bit), and when opened from terminal discord shows this:
~/ discord
WARNING: cgroup v2 is not fully supported yet, proceeding with partial confinement
/snap/discord/109/usr/share/discord/Discord: error while loading shared libraries: libX11.so.6: cannot open shared object file: No such file or directory
and telegram-desktop shows this:
~/ telegram-desktop
WARNING: cgroup v2 is not fully supported yet, proceeding with partial confinement
/snap/telegram-desktop/1561/bin/telegram-desktop: error while loading shared libraries: libQt5Widgets.so.5: cannot open shared object file: No such file or directory
both packages are installed, and I'm a bit stumped after searching threads and forums for most of the morning, nothing I tried worked, reinstalling them, trying different versions of the libraries and then the apps, installing 32bit versions, and on and on. Any help, prompts, ideas, or just general rambling about what the issue could be is much appreciated.
TLDR: Snap apps giving "error while loading shared libraries" and "cannot open shared object file: No such file or directory" when opened. Packages that are missing are installed correctly, so I'm stumped.

The warning is not your issue.
The real problem is simply you miss some dependencies in your snaps: for some reason snap is not installing all the requiered depdencies, while it should.
In an Ubuntu I have telegram-desktop and it works fine and I did this check:
snap list
to list the actual snaps.
And next I did check all the interdependencies by looking at the connections with:
snap connections telegram-desktop
this on my Utbuntu machine yields:
Interface Plug Slot Notes
alsa telegram-desktop:alsa - -
audio-playback telegram-desktop:audio-playback :audio-playback -
audio-record telegram-desktop:audio-record - -
content[gtk-3-themes] telegram-desktop:gtk-3-themes gtk-common-themes:gtk-3-themes -
content[icon-themes] telegram-desktop:icon-themes gtk-common-themes:icon-themes -
content[kde-frameworks-5-core18-all] telegram-desktop:kde-frameworks-5-plug kde-frameworks-5-core18:kde-frameworks-5-core18-slot -
content[sound-themes] telegram-desktop:sound-themes gtk-common-themes:sound-themes -
desktop telegram-desktop:desktop :desktop -
desktop-legacy telegram-desktop:desktop-legacy :desktop-legacy -
gsettings telegram-desktop:gsettings :gsettings -
home telegram-desktop:home :home -
network telegram-desktop:network :network -
network-manager telegram-desktop:network-manager - -
opengl telegram-desktop:opengl :opengl -
pulseaudio telegram-desktop:pulseaudio :pulseaudio -
removable-media telegram-desktop:removable-media - -
unity7 telegram-desktop:unity7 :unity7 -
wayland telegram-desktop:wayland :wayland -
x11 telegram-desktop:x11 :x11 -
next I have found that the library libQt5Widgets.so.5 you are missing is provided by kde-frameworks-5-core18
sudo find /snap -name libQt5Widgets.so
/snap/kde-frameworks-5-core18/32/usr/lib/x86_64-linux-gnu/libQt5Widgets.so
I don't know if on fedora you could use:
snap install kde-frameworks-5-core18
to fix your missing dependency.
On the other side on Fedora and similar distros you could try to use flatpak instaead of snap: flatpak comes as default app-package manager for the Fedora family.
First you need to add flathub as a flatpak remote repository:
sudo flatpak remote-add --if-not-exists flathub https://dl.flathub.org/repo/flathub.flatpakrepo
next you can search:
flatpak search discord
flatpak search telegram
and next install the apps:
sudo flatpak install com.discordapp.Discord
sudo flatpak install org.telegram.desktop
I tested this on a CentOS virtual machine (I dont' have a fedora ready to test, but CentOS is close enough) and I got them both correctly working.

Hey I'm not an expert at all, but I've been facing the same issue, and it seems that doing a "snap refresh" fixed the problem on my ubuntu. I'm not sure if it's relevant or not, but it might help

Related

Could not start a new session. Response code 500. Message: session not created: This version of ChromeDriver only supports Chrome version 100

I am in the learning phase in the automation.
In my first program, when I am trying to run it, getting below error.
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
Starting ChromeDriver 100.0.4896.60 (6a5d10861ce8de5fce22564658033b43cb7de047-refs/branch-heads/4896#{#875}) on port 57583
Only local connections are allowed.
Please see https://chromedriver.chromium.org/security-considerations for suggestions on keeping ChromeDriver safe.
ChromeDriver was started successfully.
Exception in thread "main" org.openqa.selenium.SessionNotCreatedException: Could not start a new session. Response code 500. Message: session not created: This version of ChromeDriver only supports Chrome version 100
Current browser version is 102.0.5005.63 with binary path C:\Program Files\Google\Chrome\Application\chrome.exe
Build info: version: '4.2.0', revision: '86eb611648'
It will be a great help if anybody help me in this to resolve.
Thanks in advance.
So first thing you should do is update your google chorme.
Click on the 3 dots > help > about google chrome > and check if it is already up to date.
After updating, search for webdrive for google chrome.
Download the version that is the same as yours, for example.
Mine is 103. Then download driver 103.
When you've downloaded the driver, unzip it and insert it into your drivers folder on your user's C:.
Example:
C:\Users\lucas\driver
After putting it in, try to run your program again.
Note * I found this out by going to my system variables and accessing the Paths that were in there.
You can probably find and check beforehand. If there is something in one of your paths like this:
C:\Users\lucas\driver
and paste exactly in that path. It will work.

Change mysql db location when installed with homebrew using Big Sur and external hard drive

Previously I had /usr/local/var/mysql symlinked to /Volumes/External/mysql meaning all my databases were stored on the external hard drive.
I have had to reformat my machine and upgrade to BigSur. If I try to set up the symlink as before I now get the following when I try to start MySQL
brew services start mysql
Bootstrap failed: 5: Input/output error
Error: Failure while executing; `/bin/launchctl bootstrap gui/502 /Users/jamie/Library/LaunchAgents/homebrew.mxcl.mysql.plist` exited with 5.
If I try to also change the -datadir in
/usr/local/Cellar/mysql/8.0.26/homebrew.mxcl.mysql.plist
to be
<string>--datadir=/Volumes/External/mysql</string>
I get the same error
brew services start mysql
Bootstrap failed: 5: Input/output error
Error: Failure while executing; `/bin/launchctl bootstrap gui/502 /Users/jamie/Library/LaunchAgents/homebrew.mxcl.mysql.plist` exited with 5.
I have tried
launchctl unload /Users/jamie/Library/LaunchAgents/homebrew.mxcl.mysql.plist
launchctl load /Users/jamie/Library/LaunchAgents/homebrew.mxcl.mysql.plist
but that didn't work either. It's like it doesn't have the correct permissions. Looking at the privacy settings you can see httpd which is also installed by brew is allowed to see "Removable volumes".
I can't add MySQL as the + symbol is grey out even though I have unlocked the panel
The external hard drive is located at /Volumes/External/ and is APFS (Encrypted) volume.
Any help would be much appreciated
https://github.com/Homebrew/discussions/discussions/2092#discussioncomment-1286031
Select System Preferences->Security & Privacy->Full Disk Access
Click the lock to make changes
Click '+'
Press 'cmd + Shift + .' to show hidden files
select /bin/sh

Fatal error: Call to undefined function mb_convert_encoding() in /home/abcdef/public_html/folder_name/lib/Pelago/Emogrifier.php on line 556

Fatal error: Call to undefined function mb_convert_encoding() in
/home/abcdef/public_html/folder_name/lib/Pelago/Emogrifier.php on line
556
solve this error in magento code.
this is the code , at return line its showing error.
private function getUnifiedHtml() {
if (!empty($this->unprocessableHtmlTags)) { $unprocessableHtmlTags = implode('|', $this->unprocessableHtmlTags); $bodyWithoutUnprocessableTags = preg_replace('/<\\/?(' . $unprocessableHtmlTags . ')[^>]*>/i', '', $this->html); } else { $bodyWithoutUnprocessableTags = $this->html; }
return mb_convert_encoding($bodyWithoutUnprocessableTags, 'HTML-ENTITIES', self::ENCODING);
}
It looks like you are missing a PHP extension mbstring.
Install it and the error will be rectified.
Ubuntu/Debian
sudo apt-get install php-mbstring
In case you are using PHP 7.x.
sudo apt-get install php7.0-mbstring
For Centos
sudo yum install php-mbstring
I'm updating this thread with the instructions for GoDaddy hosted servers, as I went through a painful day trying to get this resolved. The mbstring extension is used by Magento (I needed it for 1.9) and without it installed, the checkout process will fail, with the shopping cart failing to take the user to the 'Thanks for your order screen' (although the order is sometimes created on the back-end successfully). It was also creating an issue when hitting the 'Send Email' button on the Admin panel on an Order, producing a 500 error.
In my log files, I was seeing the following error:
PHP Fatal error: Call to undefined function mb_convert_encoding() in
/home/yoursite/public_html/lib/Pelago/Emogrifier.php on line 556
Searching for this error gave results that suggested I needed to enable the mbstring extension on the server, but with a GoDaddy hosted virtual server, I ran into a wall of frustration with the package not being found via the php install search, and their tech support unable to assist. Here are the instructions for the current WHM panel (Jan 2019):
Login to your server WHM as root.
Search EasyApache or go to the Software menu on the left and select 'EasyApache 4'.
You will see a list of profiles and at the top of the list, 'Currently Installed Packages'. Select the 'Customize' button.
Select the 'PHP Extensions' link or keep hitting 'Next' until you reach the page.
In the search box, type 'string', you will see 'php56-php-mbstring' and 'php70-php-mbstring'; move the grey slider on the right to install each.
Continue to the 'Review' tab. Here you can simply hit 'Provision' to install the extension. You can also save these options as a custom profile if you'd like.
After the build has completed, the extension should be available on all your domains.
Hopefully this will save someone some time trying to figure this out!

Xcode Server Bot, ipatool error

We have an Xcode Server bot set up for CI for our project, using Xcode 7.1. It's set to produce an IPA. We only recently noticed, but a few weeks ago, it started giving this warning every build:
Bot Issue for CareConsult Bot (develop) (build service warning)
Assertion: exportArchive: ipatool failed with an exception:
File: (null):(null)
This prevents it from producing an IPA, which is a problem.
I've tried:
- Creating a new bot
- updating gems (saw a similar issue that was resolved this way)
Doing an archive & export on my local machine gives the same error if I choose to "Export for specific device". So the problem is not specific to the build server.
Any ideas?
My suspicion is that this has to do with enabling bit code, and the build bot is using the "compile from bitcode" option by default. I'm still digging into this, but figured I'd share what I have found thus far.

I think OSX-gcc-installer broke some things and I'm not sure what to do

Long story short is I foolishly installed OSX-gcc-installer about a month ago and at first it prevented me, I believe, from installing Ruby gems on my machine. With the help of someone I did get this one issue fixed. Going through other the other posts on this website I was not able to find the solution that I'm looking for, so I decided to post here.
When I run brew doctor I get the following:
albys-mbp:folder alby$ brew doctor
Please note that these warnings are just used to help the Homebrew maintainers
with debugging if you file an issue. If everything you use Homebrew for is
working fine: please don't worry and just ignore them. Thanks!
Warning: You have an outdated version of /usr/bin/install_name_tool installed.
This will cause binary package installations to fail.
This can happen if you install osx-gcc-installer or RailsInstaller.
To restore it, you must reinstall OS X or restore the binary from
the OS packages.
Warning: Broken symlinks were found. Remove them with `brew prune`:
/usr/local/bin/aclocal
/usr/local/bin/aclocal-1.14
/usr/local/bin/autoconf
/usr/local/bin/autoheader
/usr/local/bin/autom4te
/usr/local/bin/automake
/usr/local/bin/automake-1.14
/usr/local/bin/autoreconf
/usr/local/bin/autoscan
/usr/local/bin/autoupdate
/usr/local/bin/cscope
/usr/local/bin/erb
/usr/local/bin/gem
/usr/local/bin/glibtool
/usr/local/bin/glibtoolize
/usr/local/bin/gpg-error
/usr/local/bin/gpg-error-config
/usr/local/bin/ifnames
/usr/local/bin/irb
/usr/local/bin/ksba-config
/usr/local/bin/ocs
/usr/local/bin/pkg-config
/usr/local/bin/rake
/usr/local/bin/rdoc
/usr/local/bin/ri
/usr/local/bin/ruby
/usr/local/bin/testrb
/usr/local/include/gpg-error.h
/usr/local/include/ksba.h
/usr/local/include/libltdl
/usr/local/include/ltdl.h
/usr/local/include/ruby-2.1.0
/usr/local/include/yaml.h
/usr/local/lib/libgpg-error.0.dylib
/usr/local/lib/libgpg-error.dylib
/usr/local/lib/libksba.8.dylib
/usr/local/lib/libksba.dylib
/usr/local/lib/libltdl.7.dylib
/usr/local/lib/libltdl.a
/usr/local/lib/libltdl.dylib
/usr/local/lib/libruby.2.1.0-static.a
/usr/local/lib/libruby.2.1.0.dylib
/usr/local/lib/libruby.2.1.dylib
/usr/local/lib/libruby.dylib
/usr/local/lib/libyaml-0.2.dylib
/usr/local/lib/libyaml.a
/usr/local/lib/libyaml.dylib
/usr/local/lib/pkgconfig/ruby-2.1.pc
/usr/local/lib/pkgconfig/yaml-0.1.pc
/usr/local/lib/ruby/2.1.0
/usr/local/lib/ruby/gems
/usr/local/share/aclocal/README
/usr/local/share/aclocal/argz.m4
/usr/local/share/aclocal/dirlist
/usr/local/share/aclocal/gpg-error.m4
/usr/local/share/aclocal/ksba.m4
/usr/local/share/aclocal/libtool.m4
/usr/local/share/aclocal/ltdl.m4
/usr/local/share/aclocal/ltoptions.m4
/usr/local/share/aclocal/ltsugar.m4
/usr/local/share/aclocal/ltversion.m4
/usr/local/share/aclocal/lt~obsolete.m4
/usr/local/share/aclocal/pkg.m4
/usr/local/share/aclocal-1.14
/usr/local/share/autoconf
/usr/local/share/automake-1.14
/usr/local/share/common-lisp
/usr/local/share/doc/automake
/usr/local/share/doc/pkg-config/pkg-config-guide.html
/usr/local/share/emacs
/usr/local/share/info/gpgrt.info
/usr/local/share/info/ksba.info
/usr/local/share/info/libtool.info
/usr/local/share/info/libtool.info-1
/usr/local/share/info/libtool.info-2
/usr/local/share/libtool
/usr/local/share/man/man1/aclocal-1.14.1
/usr/local/share/man/man1/aclocal.1
/usr/local/share/man/man1/autoconf.1
/usr/local/share/man/man1/autoheader.1
/usr/local/share/man/man1/autom4te.1
/usr/local/share/man/man1/automake-1.14.1
/usr/local/share/man/man1/automake.1
/usr/local/share/man/man1/autoreconf.1
/usr/local/share/man/man1/autoscan.1
/usr/local/share/man/man1/autoupdate.1
/usr/local/share/man/man1/config.guess.1
/usr/local/share/man/man1/config.sub.1
/usr/local/share/man/man1/cscope.1
/usr/local/share/man/man1/erb.1
/usr/local/share/man/man1/glibtool.1
/usr/local/share/man/man1/glibtoolize.1
/usr/local/share/man/man1/gpg-error-config.1
/usr/local/share/man/man1/ifnames.1
/usr/local/share/man/man1/irb.1
/usr/local/share/man/man1/pkg-config.1
/usr/local/share/man/man1/rake.1
/usr/local/share/man/man1/ri.1
/usr/local/share/man/man1/ruby.1
/usr/local/Library/LinkedKegs/autoconf
/usr/local/Library/LinkedKegs/automake
/usr/local/Library/LinkedKegs/cscope
/usr/local/Library/LinkedKegs/libgpg-error
/usr/local/Library/LinkedKegs/libksba
/usr/local/Library/LinkedKegs/libtool
/usr/local/Library/LinkedKegs/libyaml
/usr/local/Library/LinkedKegs/pkg-config
/usr/local/Library/LinkedKegs/ruby
Warning: You seem to have osx-gcc-installer installed.
Homebrew doesn't support osx-gcc-installer. It causes many builds to fail and
is an unlicensed distribution of really old Xcode files.
Please run `xcode-select --install` to install the CLT.
Warning: Some installed formula are missing dependencies.
You should `brew install` the missing dependencies:
brew install openssl
Run `brew missing` for more details.
alby-mbp:folder alby$
As you can also see above, I am missing openssl. This is because I uninstalled it and attempted to reinstall it thinking that this would help, but I was not able to reinstall. Here is what I get when I try to do brew install openssl:
albys-mbp:folder alby$ brew install openssl
Warning: You seem to have osx-gcc-installer installed.
Homebrew doesn't support osx-gcc-installer. It causes many builds to fail and
is an unlicensed distribution of really old Xcode files.
Please run `xcode-select --install` to install the CLT.
Warning: You have an outdated version of /usr/bin/install_name_tool installed.
This will cause binary package installations to fail.
This can happen if you install osx-gcc-installer or RailsInstaller.
To restore it, you must reinstall OS X or restore the binary from
the OS packages.
==> Downloading https://downloads.sf.net/project/machomebrew/Bottles/openssl-1.0.1j_1.mavericks.bottle.tar.gz
Already downloaded: /Library/Caches/Homebrew/openssl-1.0.1j_1.mavericks.bottle.tar.gz
Error: SHA1 mismatch
Expected: 65e125a4777eb6dfb63f01a18f724246123dd79e
Actual: eac5e2d21af64224fc533ebb793b99a2aea434c7
Archive: /Library/Caches/Homebrew/openssl-1.0.1j_1.mavericks.bottle.tar.gz
To retry an incomplete download, remove the file above.
Warning: Bottle installation failed: building from source.
==> Installing openssl dependency: makedepend
==> Downloading https://downloads.sf.net/project/machomebrew/Bottles/makedepend-1.0.5.mavericks.bottle.tar.gz
Already downloaded: /Library/Caches/Homebrew/makedepend-1.0.5.mavericks.bottle.tar.gz
Error: SHA1 mismatch
Expected: 83db1daee01e4eb752c711934eb88850b3ee70d6
Actual: eac5e2d21af64224fc533ebb793b99a2aea434c7
Archive: /Library/Caches/Homebrew/makedepend-1.0.5.mavericks.bottle.tar.gz
To retry an incomplete download, remove the file above.
Warning: Bottle installation failed: building from source.
Error: /usr/local/opt/pkg-config not present or broken
Please reinstall pkg-config. Sorry :(
albys-mbp:folder alby$
Another issue is that when I try and run mysql in bash, I get the following:
albys-mbp:folder alby$ mysql
dyld: Library not loaded: ##HOMEBREW_PREFIX##/opt/openssl/lib/libssl.1.0.0.dylib
Referenced from: /usr/local/bin/mysql
Reason: image not found
Trace/BPT trap: 5
albys-mbp:folder alby$
I am mostly new to programming and am not sure where to begin to solve this issue. I was able to backup my HD to an external HD, but this is after installing the gcc-installer which overwrote my Command Line Tools. So even if I were to do a reinstall, would that even work? I've never had to reinstall my OS X before; would I be able to pick and choose files from the external HD or is it all restored?
Also, I have OS X 10.9.
Thanks!