Dump_image and JPEG library

for dump_image command, what should I install in UBUNTU to know the related LIB, PATH and INC?
I used “Independent JPEG Group” but I could not make it.
does anyone have some experience about it? how to install JPEG library?

I used the libjpeg-dev package, with the following settings in the LAMMPS makefile:

LMP_INC = -DLAMMPS_JPEG

JPG_LIB = -ljpeg