How to install ue4 in Ubuntu 19.04?

I am trying to install Unreal on Ubuntu 19.04 and I get a message saying it can’t install because of mono being obsolete. My terminal output is as follows:

Registering git hooks... (this will override existing ones!)
Fixing inconsistent case in filenames.
Setting up Mono
Checking dependencies (excluding Win32, Win64, Mac, Android)...
Result: 0
Register the engine installation...
Refusing to run with the root privileges.
Attempting installation of missing package: mono-dmcs
+ sudo apt-get install -y mono-dmcs
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Package mono-dmcs is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
However the following packages replace it:
  mono-mcs

E: Package 'mono-dmcs' has no installation candidate

When I try to install mono-mcs my terminal says it is already on the most recent version:

Reading package lists... Done
Building dependency tree       
Reading state information... Done
mono-mcs is already the newest version (5.20.1.19-0xamarin2+ubuntu1804b1).
0 upgraded, 0 newly installed, 0 to remove and 12 not upgraded.

I though that because I had the most recent version of the package it would suffice and ran the GenerateProjectFiles.sh script. However, I got the following output:

Attempting to set up UE4 pretty printers for gdb (existing UE4Printers.py, if any, will be overwritten)...
	updated UE4Printers.py
	found necessary entries in ~/.gdbinit file, not changing it.

Setting up Unreal Engine 4 project files...

Fixing inconsistent case in filenames.
Setting up Mono
WARNING: Exception while generating include data for UE4Editor: Unable to build: no compatible clang version found. Please run Setup.sh
WARNING: Exception while generating include data for BlankProgram: Unable to build: no compatible clang version found. Please run Setup.sh
[And the same error message repeats itself lots of times]

Is there anything I should do prior to run the Setup.sh script?

Thanks in advance!

You can try changing mono-dmcs to mono-mcs and using a more current clang.

You can do it with this command:

sed -i.bak "s/mono-dmcs/mono-mcs/;s/clang-3.9/clang-7/" Engine/Build/BatchFiles/Linux/Setup.sh

Then you can try running Setup.sh again.

Sorry my poor english. I faced other problems with other dependeces, like libmonocurl, and a few others. Using your command as example i could replace what Setup.sh was looking for, that is old as my terminal output tells me. And it seems that i’ll be able to build ue4.18. (I have an old notebook, that’s as far as it can go)