Seems like UE4 has dependency on lib2sdl-dev and installing it wants to downgrade mesa packages to the Ubuntu defaults.
I would just drop the ppa but the latest nvidia driver in Ubuntu repos is actually too old for my GPU and I’d rather avoid manual driver installation if possible.
UE4 does not have a dependency to SDL2 as it uses the one from Engine/Source/ThirdParty/SDL2 folder. If you have SDL2 elsewhere in the system, it might actually interfere with compilation of the Engine, so the best bet is to remove the system SDL2.
Also I am not sure why you are running Mesa drivers instead of Nvidia binary ones since there are known issues with Mesa (just look up here on the AH in the Linux subsection).
So it seemed this wiki was outdated: A new, community-hosted Unreal Engine Wiki - Announcements - Epic Developer Community Forums
Nevermind seems like you already fixed it (that was quick).
I’d also suggest adding clang to the dependency list for the clang symlink that the compile process requires.