Internal build system error. BuildProgram exited with code -532462766.

so i am having this error in unity when i try to enter in play mode. a help is much appreciated
so the complete error is as follows:-
Internal build system error. BuildProgram exited with code -532462766.
Unhandled exception. System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation.
—> Bee.Stevedore.Program.HumaneException: ‘cache-folder’ could not be inferred from environment, nor was it configured in Stevedore.conf
at Bee.Stevedore.Program.StevedoreConfig.GlobalConfig.get_CacheFolder()
at Bee.Stevedore.Program.DownloadCache…ctor(StevedoreConfig config, Action`1 emitWarning)
at Bee.Core.Stevedore.StevedoreUnpacker…ctor(Backend backend)
at Bee.Core.RequirementsForRunningBuildCode…ctor(Backend backend)
at Bee.Core.Backend.InstallRequirementsForRunningBuildCode()
at Bee.Core.BuildProgramContext…ctor(NPath dagJsonFile, NPath inputDataFile)
at Bee.Core.BuildProgramContext…ctor(String args)
at ScriptCompilationBuildProgram.Program.Main(String args)
— End of inner exception stack trace —
at System.RuntimeMethodHandle.InvokeMethod(Object target, Object arguments, Signature sig, Boolean constructor, Boolean wrapExceptions)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object parameters, CultureInfo culture)
at System.Reflection.MethodBase.Invoke(Object obj, Object parameters)
at Program.Main(String args)
,hey guys i am trying to enter in play mode in unity and i am having this error so is there any solution. Please let me know. your help will be much appreciated

Has anyone found a solution?

[14:18:32] :	 [Step 3/6] Starting: C:\Program Files\Unity\Hub\Editor\2021.2.7f1\Editor\Data\bee_backend.exe --profile="Library/Bee/backend_profiler0.traceevents" --stdin-canary --dagfile="Library/Bee/1900b0aE.dag" --continue-on-failure ScriptAssemblies
[14:18:32] :	 [Step 3/6] WorkingDir: D:/Teamcity/buildAgent/work/590a688724df49ca
[14:18:32] :	 [Step 3/6] ExitCode: 4 Duration: 0s28ms
[14:18:32] :	 [Step 3/6] [             ] Require frontend run.  Library/Bee/1900b0aE.dag couldn't be loaded
[14:18:32] :	 [Step 3/6] Starting: C:\Program Files\Unity\Hub\Editor\2021.2.7f1\Editor\Data\Tools

etcorerun
etcorerun.exe “C:\Program Files\Unity\Hub\Editor\2021.2.7f1\Editor\Data\Tools\BuildPipeline\ScriptCompilationBuildProgram.exe” “Library/Bee/1900b0aE.dag.json” “Library/Bee/1900b0aE-inputdata.json” “Library/Bee/buildprogram0.traceevents”
[14:18:32] : [Step 3/6] WorkingDir: D:/Teamcity/buildAgent/work/590a688724df49ca
[14:18:34] : [Step 3/6] Android Extension - Scanning For ADB Devices 4485 ms
[14:18:48] : [Step 3/6] ExitCode: -532462766 Duration: 15s
[14:18:48] : [Step 3/6] Internal build system error. BuildProgram exited with code -532462766.
[14:18:48] : [Step 3/6] Unhandled exception. System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation.
[14:18:48] : [Step 3/6] —> Bee.Stevedore.Program.HumaneException: ‘cache-folder’ could not be inferred from environment, nor was it configured in Stevedore.conf
[14:18:48] : [Step 3/6] at Bee.Stevedore.Program.StevedoreConfig.GlobalConfig.get_CacheFolder()
[14:18:48] : [Step 3/6] at Bee.Stevedore.Program.DownloadCache…ctor(StevedoreConfig config, Action`1 emitWarning)
[14:18:48] : [Step 3/6] at Bee.Core.Stevedore.StevedoreUnpacker…ctor(Backend backend)
[14:18:48] : [Step 3/6] at Bee.Core.RequirementsForRunningBuildCode…ctor(Backend backend)
[14:18:48] : [Step 3/6] at Bee.Core.BuildProgramContext…ctor(String args, String buildTitle)
[14:18:48] : [Step 3/6] at ScriptCompilationBuildProgram.ScriptCompilationBuildProgram.Main(String args)
[14:18:48] : [Step 3/6] — End of inner exception stack trace —
[14:18:48] : [Step 3/6] at System.RuntimeMethodHandle.InvokeMethod(Object target, Object arguments, Signature sig, Boolean constructor, Boolean wrapExceptions)
[14:18:48] : [Step 3/6] at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object parameters, CultureInfo culture)
[14:18:48] : [Step 3/6] at System.Reflection.MethodBase.Invoke(Object obj, Object parameters)
[14:18:48] : [Step 3/6] at Program.Main(String args)
[14:18:48] : [Step 3/6] AssetDatabase: script compilation time: 16.367933s
[14:18:48] : [Step 3/6] Scripts have compiler errors.

i use ilspy71 saw the code, found unity can not set up cache and config dir, you can use these env var:

export XDG_CONFIG_HOME=/path/to/.config

export XDG_CACHE_HOME=/path/to/.cache

ilspy71 decompile Editor\Data\Tools\BuildPipeline\Bee.Stevedore.Program.exe

find the class:

EnvironmentPaths.EnvironmentPaths(IDictionary environment);