# debian
$ sudo apt install valgrind
# redhat
$ sudo yum -y install valgrind
- by self
$ # install -y autoconf automake
$ wget http://valgrind.org/downloads/valgrind-3.10.1.tar.bz2
$ tar zxvf valgrind-3.10.1.tar.bz2
$ cd valgrind-3.10.1
$ ./autogen.sh
$ ./configure
$ make && make install
# add PATH to env:PATH
# PATH=${PATH}:/usr/local/valgrind/bin
$ brew tap LouisBrunner/valgrind
$ brew install --HEAD LouisBrunner/valgrind/valgrind