How to build Unreal Engine 4.18 on Ubuntu 16.04

Hi all,

I am trying to build Unreal Engine 4.18 on Ubuntu 16.04. I clone all necessary files from GitHub and run the ./Setup.sh file but it stops all of a sudden at 99% every time and throws an error. I am kind of desperate with it because there is not much information of it on the Internet and my connection is ok.

The log of the terminal is the following:

MIGUEL:~$ sudo apt-get install build-essential clang-3.9 git cmake ninja-build python3-requests python-dev tzdata sed curl wget unzip autoconf libtool
[sudo] password for MIGUEL: 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
autoconf is already the newest version (2.69-9).
build-essential is already the newest version (12.1ubuntu2).
libtool is already the newest version (2.4.6-0.1).
python3-requests is already the newest version (2.9.1-3).
sed is already the newest version (4.2.2-7).
unzip is already the newest version (6.0-20ubuntu1).
ninja-build is already the newest version (1.5.1-0.1ubuntu1).
cmake is already the newest version (3.5.1-1ubuntu3).
curl is already the newest version (7.47.0-1ubuntu2.7).
git is already the newest version (1:2.7.4-0ubuntu1.3).
python-dev is already the newest version (2.7.12-1~16.04).
tzdata is already the newest version (2017c-0ubuntu0.16.04).
wget is already the newest version (1.17.1-1ubuntu1.4).
clang-3.9 is already the newest version (1:3.9.1-4ubuntu3~16.04.2).
0 upgraded, 0 newly installed, 0 to remove and 4 not upgraded.
MIGUEL:~$ sudo update-alternatives --install /usr/bin/clang++ clang++ /usr/lib/llvm-3.9/bin/clang++ 100
MIGUEL:~$ sudo update-alternatives --install /usr/bin/clang clang /usr/lib/llvm-3.9/bin/clang 100
MIGUEL:~$ git clone --depth=1 -b 4.18 https://github.com/EpicGames/UnrealEngine.git ~/UnrealEngine_4.18
Cloning into '/home/MIGUEL/UnrealEngine_4.18'...
Username for 'https://github.com': SpakMiguel
Password for 'https://SpakMiguel@github.com': 
remote: Counting objects: 78600, done.
remote: Compressing objects: 100% (61677/61677), done.
remote: Total 78600 (delta 16208), reused 68294 (delta 14949), pack-reused 0
Receiving objects: 100% (78600/78600), 160.48 MiB | 528.00 KiB/s, done.
Resolving deltas: 100% (16208/16208), done.
Checking connectivity... done.
Checking out files: 100% (82677/82677), done.
MIGUEL:~$ cd ~/UnrealEngine_4.18
MIGUEL:~/UnrealEngine_4.18$ ./Setup.sh
Registering git hooks... (this will override existing ones!)

Github build
Checking / downloading the latest archives
Checking dependencies (excluding Win32, Win64, Mac, Android)...
Updating dependencies:  99% (28390/28391), 4870.5/4892.6 MiB | 14.78 MiB/s...
Failed to download 'http://cdn.unrealengine.com/dependencies/2839850-632f4ca3f7a5496781b581496d5328d0/c00facf08e7d27b584bb1a8fdb7dcd0388c228f6': Can't read from pack stream (CorruptPackFileException)
Result: 1

CorruptPackFileException can be seen at the end.

Any help is appreciated. Thanks in advance.