在Ubuntu22.04中出现,而且出现这个错误的版本是低于Unity2022.x的版本。自己测试了Unity2020.x和Unity2021.x都会出现这个错误。

重现的步骤也很简单,创建一个空项目并进入就会报错,然后提示进入safety mode。
这个错误会在Unity的Editor.log中留下线索,不过在打开项目前,记得先把Editor.log先删除,这样在报错的时候会生成一个新的Editor.log文件。也可以不用这样做,这样做的主要目的是日志少检查起来比较简单。
打开Unity编辑器的日志:Editor.log。发现以下关键信息

-----CompilerOutput:-stderr----------
No usable version of the libssl was found
/home/eyap/Unity/Hub/Editor/2020.3.33f1/Editor/Data/Tools/RoslynScripts/unity_csc.sh: line 3: 25959 Aborted (core dumped) "/home/eyap/Unity/Hub/Editor/2020.3.33f1/Editor/Data/Tools/RoslynScripts/../../Tools/Roslyn/csc" /shared /noconfig @temp/UnityTempFi
-----EndCompilerOutput---------------

No usable version of the libssl was found 可以看出是缺少了 libssl库导致的。用下面的命令安装一个就行了:

echo "deb http://security.ubuntu.com/ubuntu focal-security main" | sudo tee /etc/apt/sources.list.d/focal-security.list
sudo apt-get update
sudo apt-get install libssl1.1

相关的讨论连接:
https://forum.unity.com/threads/unity2020-3-doesnt-works-on-linux.1338869/