1

Running Ubuntu 18.04. I have added ppa:ubuntu-toolchain-r/test.

I have successfully installed gcc-10:

$ sudo apt-get install gcc-10
Reading package lists... Done
Building dependency tree
Reading state information... Done
gcc-10 is already the newest version (10.1.0-2ubuntu1~18.04).

I have also installed g++-7:

$ sudo apt-get install g++-7
Reading package lists... Done
Building dependency tree
Reading state information... Done
g++-7 is already the newest version (7.5.0-3ubuntu1~18.04).

Bit I cannot install g++-10:

$ sudo apt-get install g++-10
Reading package lists... Done
Building dependency tree
Reading state information... Done
Note, selecting 'clang-10-examples' for regex 'g++-10'
Note, selecting 'clang-10' for regex 'g++-10'
Note, selecting 'libclang-10-dev' for regex 'g++-10'
Note, selecting 'python-clang-10' for regex 'g++-10'
Note, selecting 'clang-10-doc' for regex 'g++-10'
Note, selecting 'python3-clang-10' for regex 'g++-10'
clang-10 is already the newest version (1:10.0.0-4ubuntu1~18.04.1).
clang-10-doc is already the newest version (1:10.0.0-4ubuntu1~18.04.1).
clang-10-examples is already the newest version (1:10.0.0-4ubuntu1~18.04.1).
libclang-10-dev is already the newest version (1:10.0.0-4ubuntu1~18.04.1).
python3-clang-10 is already the newest version (1:10.0.0-4ubuntu1~18.04.1).

What could be the problem?

Edit:

after doing apt-get update && apt-get upgrade:

$ apt policy '^gcc-10$' '^g\+\+-10$'
gcc-10:
  Installed: 10.1.0-2ubuntu1~18.04
  Candidate: 10.1.0-2ubuntu1~18.04
  Version table:
 *** 10.1.0-2ubuntu1~18.04 500
        500 http://ppa.launchpad.net/ubuntu-toolchain-r/test/ubuntu bionic/main amd64 Packages
        100 /var/lib/dpkg/status
N: Unable to locate package ^g\+\+-10$
N: Couldn't find any package by regex '^g\+\+-10$'

Running the command with a plain query g++-10 results in showing every package that matches the regex, but NO g++10.

10
  • That's odd - the only thing I can suggest is you run sudo apt-get update (or sudo apt update) again and then edit your question to include the output of apt policy gcc-10 g++-10 Jul 5 '20 at 13:50
  • @steeldriver updated Jul 5 '20 at 14:50
  • OK well sorry I am unable to reproduce this - an amd64 version of 10.1.0-2ubuntu1~18.04 is clearly present in the PPA and installs correctly for me. You don't have some kind of local cache or apt-mirror setup I suppose? Jul 5 '20 at 15:04
  • @steeldriver I'm completely baffled now, because sometimes I can see g++10 and sometimes I cannot. Moreover, when I managed to install g++-10 during a window of visibility, something has removed it without telling me. I have no idea what's going on... Jul 5 '20 at 15:42
  • On older releases of Ubuntu, APT would treat g++-10 as regex when there's no package with such name available. On one hand, it seems PPA is enabled while OTOH it seems PPA is disabled. What is the output of lz4 -d /var/lib/apt/lists/ppa.launchpad.net_ubuntu-toolchain-r_test_ubuntu_dists_bionic_main_binary-amd64_Packages.lz4 | grep "g++-10"? If lz4 isn't available, you can install it with apt install liblz4-tool.
    – Kulfy
    Jul 5 '20 at 16:26
1

The problem is that my computer at work is managed by puppet. I had no idea.

Apparently somebody in the IT has changed the central configuration recently. Now puppy removes my PPA and force-installs specific versions of certain packages every now and then.

2

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.