ubuntu下安装 infer

sudo apt-get update
sudo apt-get upgrade
sudo apt-get install git openjdk-7-jdk m4 zlib1g-dev python-software-properties build-essential libgmp-dev libmpfr-dev libmpc-dev unzip
wget https://github.com/ocaml/opam/releases/download/1.2.2/opam-1.2.2-x86_64-Linux -O opam
chmod +x opam
./opam init --comp=4.01.0 #(then say 'y' to the final question)
eval `./opam config env`
./opam install extlib.1.5.4 atdgen.1.6.0 javalib.2.3.1 sawja.1.5.1 #(then say 'y' to the question)
```

If you do not require support for the C/Objective-C analysis in Infer,
and only wish to analyse Java files, continue with these
instructions. By the way, Java 1.8 is not supported.

```bash
cd infer
make -C infer java
export PATH=`pwd`/infer/bin:$PATH

原文地址:https://www.cnblogs.com/wanqieddy/p/4741463.html