Clang and libtinfo.so.5

After doing a complete system reinstall and installing Unity I cannot build for WebGL.
Found some solutions online about ‘symlink’ some files and installing ‘libtinfo’ and others packages on apt, but none haved worked.

Exception: Unity.IL2CPP.Building.BuilderFailedException: /home/user/Unity/Hub/Editor/2020.3.12f1/Editor/Data/PlaybackEngines/WebGLSupport/BuildTools/Emscripten_FastComp_Linux/clang++: error while loading shared libraries: libtinfo.so.5: cannot open shared object file: No such file or directory
/home/user/Unity/Hub/Editor/2020.3.12f1/Editor/Data/PlaybackEngines/WebGLSupport/BuildTools/Emscripten/emcc.py:781: SyntaxWarning: "is not" with a literal. Did you mean "!="?
  newargs = [arg for arg in newargs if arg is not '']
/home/user/Unity/Hub/Editor/2020.3.12f1/Editor/Data/PlaybackEngines/WebGLSupport/BuildTools/Emscripten/emcc.py:896: SyntaxWarning: "is not" with a literal. Did you mean "!="?
  newargs = [a for a in newargs if a is not '']
/home/user/Unity/Hub/Editor/2020.3.12f1/Editor/Data/PlaybackEngines/WebGLSupport/BuildTools/Emscripten/emcc.py:1157: SyntaxWarning: "is not" with a literal. Did you mean "!="?
  assert options.use_closure_compiler is not 2, 'EMTERPRETIFY requires valid asm.js, and is incompatible with closure 2 which disables that'
/home/user/Unity/Hub/Editor/2020.3.12f1/Editor/Data/PlaybackEngines/WebGLSupport/BuildTools/Emscripten/emcc.py:2360: SyntaxWarning: "is not" with a literal. Did you mean "!="?
  newargs = [arg for arg in newargs if arg is not '']
ERROR:root:compiler frontend failed to generate LLVM bitcode, halting

For future reference. I installed Unity-Hub in the ‘Software Manager’ of my distro, and it uses flatpak (sandboxed package manager).
When you start any project on it, it also runs Unity-Editor in sandbox too, and you can’t get access to ‘/usr/lib’ and ‘/lib/’

Solution is to remove Unity-Hub (flatpak remove unity) and installing/running from what is provided by Start Your Creative Projects and Download the Unity Hub | Unity

If you are still having problem with a python crash while building just install python2 in your package manager.

3 Likes