Monday, April 6, 2020

skypeforlinux fails to run due to wrong version of libstdc++

Once again skypeforlinux fails to run, this seems to be a weekly occurrence for me. Not sure why it's so fragile. Usually it's due to the permissions problem that I documented a couple of months ago. This time, it's not finding the correct version of libstdc++. I updated the OS and installed anaconda last week, so I'm guessing it's due to one of those actions.

The error message looked like this:
$ /usr/share/skypeforlinux/skypeforlinux
A JavaScript error occurred in the main process
Uncaught Exception:
Error: /lib64/libstdc++.so.6: version `GLIBCXX_3.4.21' not found (required by /usr/share/skypeforlinux/resources/app.asar.unpacked/node_modules/electron-utility/build/Release/electron_utility.node)
at process.func (electron/js2c/asar.js:140:31)
at process.func [as dlopen] (electron/js2c/asar.js:140:31)
at Object.Module._extensions..node (internal/modules/cjs/loader.js:922:18)
at Object.func (electron/js2c/asar.js:140:31)
at Object.func [as .node] (electron/js2c/asar.js:149:18)
at Module.load (internal/modules/cjs/loader.js:735:32)
at Module._load (internal/modules/cjs/loader.js:648:12)
at Module._load (electron/js2c/asar.js:717:26)
at Function.Module._load (electron/js2c/asar.js:717:26)
at Module.require (internal/modules/cjs/loader.js:775:19)

I found this link, and followed some instructions about using the libstdc++ installed under anaconda in the /usr/lib64 directory. Here is a summary of the steps:

strings /usr/lib64/libstdc++.so.6 | grep GLIBCXX # to see the version of libstdc++ in your lib directory
sudo yum install libstdc++ # does nothing, yum says the package is up to date
sudo find / -name "libstdc++.so.6*" # find other installations of libstdc++, including anaconda
sudo cp /home/craig/anaconda3/lib/libstdc++.so.6.0.26 /usr/lib64/ # install libstdc++ from anaconda pkg to lib directory
sudo sudo mv /usr/lib64/libstdc++.so.6 /usr/lib64/libstdc++.so.6.bkp # make a backup of existing lib
sudo ln -s /usr/lib64/libstdc++.so.6.0.26 /usr/lib64/libstdc++.so.6 # make symlink for new lib

No comments: