WebGL Build failing with Unity version 2019.1.0f2 on Ubuntu 18.04.3 LTS

I have a fresh install of Ubuntu 18.04.3 LTS and am going through some courses for Unity. The WebGL build for the project was not completing. In the console the relevant part of the error was:

stdout:
Building build.bc with EmscriptenToolChain
Output directory: /home/al-ubuntu/Unity/2D/Text101/Temp/StagingArea/Data/Native
Cache directory: /home/al-ubuntu/Unity/2D/Text101/Library/il2cpp_cache
il2cpp.exe didn’t catch exception: System.AggregateException: One or more errors occurred. —> System.ComponentModel.Win32Exception: ApplicationName=‘python’, CommandLine=‘-E “/home/al-ubuntu/Unity-2019.1.0f2/Editor/Data/PlaybackEngines/WebGLSupport/BuildTools/Emscripten/em++” -Wno-unused-value -Wno-invalid-offsetof -nostdinc -fno-strict-overflow -Wno-null-conversion -std=c++11 -O3 -Oz -DIL2CPP_EXCEPTION_DISABLED=1 -DNET_4_0 -DUNITY_AOT -DGC_NOT_DLL -DRUNTIME_IL2CPP -DNDEBUG -I"/home/al-ubuntu/Unity-2019.1.0f2/Editor/Data/il2cpp/libil2cpp" -I"/home/al-ubuntu/Unity-2019.1.0f2/Editor/Data/il2cpp/libil2cpp" -I"/home/al-ubuntu/Unity-2019.1.0f2/Editor/Data/il2cpp/external/bdwgc/include" -I"/home/al-ubuntu/Unity/2D/Text101/Temp/StagingArea/Data/il2cppOutput" “/home/al-ubuntu/Unity/2D/Text101/Temp/StagingArea/Data/il2cppOutput/Il2CppInvokerTable.cpp” -o “/home/al-ubuntu/Unity/2D/Text101/Library/il2cpp_cache/13AA3713EA417CA85D04C74050A7C6C3.o”’, CurrentDirectory=‘’, Native error= Cannot find the specified file

It looks like the build was looking for python to be installed. For a basic installation of Ubuntu, Python 3 is installed and is invoked with the python3 command (not python). Not knowing whether there was a python 2 dependancy or not, I Installed python… “sudo apt install python”. This fixed the WebGL build issue.

@bellshapedhead_unity Did you resolved this issue? I am facing the same?

“sudo apt install python” This did the work thanks. There is dependency with python 2. It doesn’t work with Python 3 for me

1 Like

Had a similar issue. Running Unity 2019.4.13f1 on Ubuntu 20.04. Instead of installing python, creating a symlink to python3 solve the problem for me:
sudo ln -s /usr/bin/python3 /usr/bin/python