Could you tell me the distro that you are using?
Have you installed the build essential or similar for your distro ?
Possible issue is that clang downloaded and installed by running ./Setup.sh is corrupt.
delete these files using file browser
UnrealEngine/.git/ue4-sdks/v17_clang-10.0.1-centos7.tar.gz
go to UnrealEngine/Engine/Extras/ThirdPartyNotUE/SDKs/HostLinux/Linux_x64/
delete any clang folders like below
v17_clang-10.0.1-centos7
#From console ‘with internet on’ (to download clang again and dependencies possibly)
./Setup.sh
#To download nuget and .net 3.xx
./GenerateProjectFiles.sh
#Then to make sure things are working correctly we will only build ‘Unrealightmass’
#input:
make ARGS=“-clean” UnrealLightmass
#Then:
make UnrealLightmass
#See if that was successful run
make ARGS=“-clean”
#then build the engine completely make