6

I am trying to upgrade from Valgrind 3.7.0 to Valgrind 3.10.0 on Ubuntu 12.04.

I have run sudo apt-get update and sudo apt-get upgrade but when I try

sudo apt-get install valgrind

it returns

valgrind is already the newest version.

But Valgrind remains at version 3.7.0.

Zanna
  • 69,223
  • 56
  • 216
  • 327
Joey
  • 61
  • 1
  • 4
  • check the available version for your system then you'll see `apt-cache policy valgrind` – JoKeR Apr 01 '15 at 20:33
  • 1
    The newer the Ubuntu version you have, the newer the packages you can get. In [this website](https://launchpad.net/ubuntu/+source/valgrind) you can see the latest version available of Valgrind for all Ubuntu releases. If you want new packages, you can either upgrade your distribution, or install the package manually (at your own risk). An answer showing how to do that has been provided already. –  Jul 21 '16 at 08:10

2 Answers2

13

You can upgrade valgrind as follows:

wget http://valgrind.org/downloads/valgrind-3.10.1.tar.bz2
tar -xjf valgrind-3.10.1.tar.bz2
cd valgrind-3.10.1
./configure --prefix=/usr/local
make
sudo make install
ccache --clear
aviggiano
  • 133
  • 4
freehuni
  • 131
  • 1
  • 3
  • Should this be done in any specific folder? (i.e., say, not `~` because it puts all the files there?) – Nic Mar 24 '17 at 04:54
  • @QPaysTaxes: bit late now, but I cd'd into the source directory (where `tar` extracted the files) and ran it there. This matches what http://valgrind.org/docs/manual/dist.install.html says. – Mitch Aug 25 '17 at 08:01
0

You could also try to back-port the valgrind package from Trusty to Precise:

  1. Download the source files and extract them:

    wget http://archive.ubuntu.com/ubuntu/pool/main/v/valgrind/valgrind_3.10~20140411.orig.tar.gz http://archive.ubuntu.com/ubuntu/pool/main/v/valgrind/valgrind_3.10~20140411-0ubuntu1.debian.tar.gz
    tar -xf valgrind_3.10~20140411.orig.tar.gz
    cd valgrind-3.10~20140411
    tar -xf ../valgrind_3.10~20140411-0ubuntu1.debian.tar.gz
    
  2. Install build dependencies:

    sudo apt-get install build-essential devscripts debhelper autotools-dev dh-autoreconf bash-completion gdb docbook docbook-xsl docbook-xml xsltproc
    sudo apt-get install gcc-multilib libc6-dev-i386 # only if you're on amd64
    
  3. Add a changelog entry and compile:

    debchange -l~local 'Backport to Precise'
    nice debuild -b -j$(getconf _NPROCESSORS_ONLN)
    
  4. Install the newly built package:

    sudo dpkg -i ../valgrind_1:3.10~20140411-0ubuntu1~local1_*.deb
    

There's also Valgrind 3.10.1 in trusty-updates that can be built with the same recipe.

David Foerster
  • 35,754
  • 55
  • 92
  • 145