ESXi 7.0 and apt-get update

From OISecWiki

When running a debian-based distribution on ESXi 7.0.0 you might get the following error when running apt-get update.

# apt-get update
Reading package lists... Done
E: Method https has died unexpectedly!
E: Sub-process https received signal 4.

It will only appear when you have enabled https sources. This problem seems to be related to ESXi 7.0.0, and is fixed in ESXi 7.0.3.

There are 2 workarounds for this problem besides upgrading ESXi.

Set a GNUTLS environment variable

Set the following environment variable:

export GNUTLS_CPUID_OVERRIDE=0x1
Change the ESXI compatibility level

Change the virtual machine version to a ESXi 6.x compatible one.