Setup.sh fails on Ubuntu 14.04: Could not load type 'System.Net.HttpWebRequest' from assembly

Hi everyone,
I’m trying to build UE from source on a 14.04 Ubuntu Linux machine.
When I get to the Setup.sh stage, I start downloading dependencies but then get an error:
Updating dependencies: 0% (0/23383)…
Failed to download ‘http://cdn.unrealengine.com/dependencies/2964232-10fa809e802b48afac4d841dce12100b/0466ae16eae3332c50e1686ec1773ed8b90cd65d’: Could not load type ‘System.Net.HttpWebRequest’ from assembly ‘System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089’. (TypeLoadException)
Result: 1

Any ideas what is going on?
Victor

Ok, I was able to get things to work by removing an old installation of monodevelop and libmono-system* packages from my Ubuntu system first using sudo apt-get remove, then re-running the Setup.sh script (which probably installed the correct versions of mono that supports the System.Net.HttpWebRequest command).