Swap File to create extra memory
While renewing my LetsEncrypt certificate, I found myself in a strange situation where the certbot won't run asking me to update pip and then each time I tried updating pip it failed with the error error: command 'x86_64-linux-gnu-gcc' failed with exit status 4.
It turns out that this happens due to low memory and with my digitalocean droplet being the cheapest one this was bound to happen sooner rather than later. Fortunately there is a way around it as explained below.
Use of following commands will ensure that the swap file is created which in turn will help avoid the 'error: command 'x86_64-linux-gnu-gcc' failed with exit status 4'.
Following commands will create a swap file: