0

I have two Ubuntu 18.04 servers at my office that are for development work, and we have the GNU Debugger installed. All of these packages are always installed using the "sudo apt install" command. Somehow, one of the servers has a newer version of gdb than on the other.

#DVLP1

# sudo apt list --installed |grep ^gdb/
gdb/bionic-updates,now 8.1.1-0ubuntu1 amd64 [installed]

# sudo apt-cache policy gdb
gdb:
  Installed: 8.1.1-0ubuntu1
  Candidate: 8.1.1-0ubuntu1
  Version table:
 *** 8.1.1-0ubuntu1 500
        500 http://us.archive.ubuntu.com/ubuntu bionic-updates/main amd64 Packages
        100 /var/lib/dpkg/status
     8.1-0ubuntu3 500
        500 http://us.archive.ubuntu.com/ubuntu bionic/main amd64 Packages

#DVLP2

# sudo apt list --installed |grep ^gdb/
gdb/bionic,now 8.2-0ubuntu1~18.04 amd64 [installed]

# sudo apt-cache policy gdb
gdb:
  Installed: 8.2-0ubuntu1~18.04
  Candidate: 8.2-0ubuntu1~18.04
  Version table:
 *** 8.2-0ubuntu1~18.04 500
        500 http://ppa.launchpad.net/ubuntu-toolchain-r/test/ubuntu bionic/main amd64 Packages
        100 /var/lib/dpkg/status
     8.1.1-0ubuntu1 500
        500 http://us.archive.ubuntu.com/ubuntu bionic-updates/main amd64 Packages
     8.1-0ubuntu3 500
        500 http://us.archive.ubuntu.com/ubuntu bionic/main amd64 Packages

Some of our developers on DVLP1 are complaining that they are receiving the following warning, which they are not getting with gdb on DVLP2:

==28205==HINT: LeakSanitizer does not work under ptrace (strace, gdb, etc)

The only thing that I can see which is different is the gdb, so I was going to try and upgrade it to the same version on both. While gdb version 8.2 is listed in the repositories on the first system, it still only shows version 8.1.1 as the most recent copy on the second system.

I'm guessing this has something to do with the selected repositories we are downloading from. I noticed one box uses "archive.ubuntu.com" and the other "us.archive.ubuntu.com" for the bionic main. However, even after I changed the sources.list to have the same deb entries (and did the apt update), it was not showing a version higher than gdb 8.1.1

At this point, is there an easy way for me to install a package that is listed in DVLP2's apt-cache, but not in DVLP1? It looks like the 8.2 version originated from ppa.launchpad.net, but I don't remember having this as a deb entry. How would I add it to sources.list if I want to try that copy (and can I trust its contents)?

Thx Steve

3

ppa.launchpad.net means that this package was installed from a PPA.

Run that script the first one in the answer, then run the provided command on the second machine

EDIT : I was able to dig the PPA using the link http://ppa.launchpad.net/ubuntu-toolchain-r/test/ubuntu in the version table

This is an official toolchain test/prerelease repo, so yes it is safe to use

That you can add using

sudo add-apt-repository ppa:ubuntu-toolchain-r/test

Which will output :

You are about to add the following PPA:
 Toolchain test builds; see https://wiki.ubuntu.com/ToolChain

 More info: https://launchpad.net/~ubuntu-toolchain-r/+archive/ubuntu/test
Press Enter to continue or Ctrl+C to cancel

After an sudo apt update you'll be able to use v.8.2

1
  • Thanks Nicolas, I have not had a chance to try it but expect to do so in the next week.
    – S. Nixon
    Apr 7 '21 at 21:05

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.