1. After you extract the source code of JAGS, go to the folder where the JAGS makefile is using a terminal.
2. In a terminal, type the following
sudo ./configure --prefix=/usr
sudo make sudo make install
3. The step 2 will help your system to identify where the JAGS is. So in R, you can simply install rjags as:
Of course, once you can install rjags successfully in R, you can install our R2jags package as well: