I am having a problem when trying to add any additional repositories in my Ubuntu Desktop 22.04 LTS running on a VM in ESXi 7. The installation is fresh.
I'm facing the below problem when I try to sudo apt update
...
Reading package lists... Done
E: Method https has died unexpectedly!
E: Sub-process https received signal 4.
This happens whenever I try to add repositories. I was trying to add Docker and Sublime text repositories as below:
echo "deb https://download.sublimetext.com/ apt/stable/" | sudo tee /etc/apt/sources.list.d/sublime-text.list
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
When I remove the contents of sources.list.d, sudo apt update works fine.
Any help would be appreciated! Thanks
Edit:
On a related note, I also can't clone any repo. I tried using curl, wget and git clone. All these commands, give me the error:
error: git-remote-https died of signal 4
export GNUTLS_CPUID_OVERRIDE=0x1in both/root/.bashrcandtheuser/.bashrcand even I've restared the vm. But the problem exists. It's ok when I login as root and doaptcommands withoutsudobut withsudoit give the error again. – Emad Helmi Apr 17 '23 at 14:08sudois configured withenv_resetby default - you'd need to usesudo -Eorsudo --preserve-env=GNUTLS_CPUID_OVERRIDEto pass the value from an external environment – steeldriver May 08 '25 at 16:25