I want to install gcc 7.5 and found the following steps on several websites:
sudo apt-get install -y software-properties-common sudo add-apt-repository ppa:ubuntu-toolchain-r/test sudo apt update sudo apt install g++-7 -y
But when I run:
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
Errors are reported:
gpg: keyring /tmp/tmpir2cfkik/secring.gpg' created gpg: keyring /tmp/tmpir2cfkik/pubring.gpg' created gpg: requesting key BA9EF27F from hkp server keyserver.ubuntu.com Error: retrieving gpg key timed out. gpg: keyserver timed out gpg: keyserver receive failed: keyserver error
I found someone had the same problem and suggested that it would be useful to run the same command multiple times, but it doesn't work for me.
Does anyone know how to fix this problem?