2

i am using Ubuntu 14.04.5 LTS. I have gcc 4.8 and i want to upgrade it to gcc 4.9. I am trying to use the following commands i found online:

sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt-get update
sudo apt-get install gcc-4.9 g++-4.9
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.9 60 --slave /usr/bin/g++ g++ /usr/bin/g++-4.9

The first command failed so i found a solution: to use this sudo apt-add-repository "deb http://ppa.launchpad.net/ubuntu-toolchain-r/test/ubuntu trusty main" command instead and it worked.

Then i run the second command ( sudo apt-get update) but it threw the error:

W: GPG error: http://ppa.launchpad.net trusty InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 1E9377A2BA9EF27F
W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: http://extras.ubuntu.com trusty Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 16126D3A3E5C1192

W: Failed to fetch http://extras.ubuntu.com/ubuntu/dists/trusty/Release

W: Some index files failed to download. They have been ignored, or old ones used instead.

I tried to update the keys with the command sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 1E9377A2BA9EF27F 16126D3A3E5C1192 but it threw the error

gpg: keyserver timed out
gpg: keyserver receive failed: keyserver error

What do i do next?

0 Answers0