additional package installation error

Dear all,
I installed lammps (31-Mar-2017) and i got lmp_serial. Further i installed reax and reaxc for my calculations. it worked fine. further, i tried to save the image file of the run using dump command.
I got following error:

WARNING: The pair_style reax command will be deprecated soon - users should switch to pair_style reax/c (…/pair_reax.cpp:49)
ERROR: Support for writing images in JPEG format not included (…/dump_image.cpp:85)
Last command: dump 2 all image 25 image.*.jpg type type axes yes 0.8 0.02 view 60 -30

After that, i tried to install MPIIO for dump i got the error,

make[1]: Entering directory /opt/lammps/src/Obj_serial' make[1]: Leaving directory /opt/lammps/src/Obj_serial’
make[1]: Entering directory /opt/lammps/src/Obj_serial' g++ -g -O3 -DLAMMPS_GZIP -DLAMMPS_MEMALIGN=64 -DLMP_MPIIO -I../../lib/reax -I../STUBS -c ../dump_atom_gz.cpp In file included from ../dump_atom_gz.cpp:14: ../dump_atom_gz.h:24:18: error: zlib.h: No such file or directory In file included from ../dump_atom_gz.cpp:14: ../dump_atom_gz.h:34: error: ‘gzFile’ does not name a type ../dump_atom_gz.cpp: In constructor ‘LAMMPS_NS::DumpAtomGZ::DumpAtomGZ(LAMMPS_NS::LAMMPS*, int, char**)’: ../dump_atom_gz.cpp:26: error: ‘gzFp’ was not declared in this scope ../dump_atom_gz.cpp: In destructor ‘virtual LAMMPS_NS::DumpAtomGZ::~DumpAtomGZ()’: ../dump_atom_gz.cpp:36: error: ‘gzFp’ was not declared in this scope ../dump_atom_gz.cpp:36: error: ‘gzclose’ was not declared in this scope ../dump_atom_gz.cpp:37: error: ‘gzFp’ was not declared in this scope ../dump_atom_gz.cpp: In member function ‘virtual void LAMMPS_NS::DumpAtomGZ::openfile()’: ../dump_atom_gz.cpp:80: error: ‘gzFp’ was not declared in this scope ../dump_atom_gz.cpp:80: error: ‘gzopen’ was not declared in this scope ../dump_atom_gz.cpp:82: error: ‘gzFp’ was not declared in this scope ../dump_atom_gz.cpp:82: error: ‘gzopen’ was not declared in this scope ../dump_atom_gz.cpp:85: error: ‘gzFp’ was not declared in this scope ../dump_atom_gz.cpp:86: error: ‘gzFp’ was not declared in this scope ../dump_atom_gz.cpp: In member function ‘virtual void LAMMPS_NS::DumpAtomGZ::write_header(LAMMPS_NS::bigint)’: ../dump_atom_gz.cpp:99: error: ‘gzFp’ was not declared in this scope ../dump_atom_gz.cpp:99: error: ‘gzprintf’ was not declared in this scope ../dump_atom_gz.cpp:109: error: ‘gzFp’ was not declared in this scope ../dump_atom_gz.cpp:109: error: ‘gzprintf’ was not declared in this scope ../dump_atom_gz.cpp: In member function ‘virtual void LAMMPS_NS::DumpAtomGZ::write_data(int, double*)’: ../dump_atom_gz.cpp:126: error: ‘gzFp’ was not declared in this scope ../dump_atom_gz.cpp:126: error: ‘gzwrite’ was not declared in this scope ../dump_atom_gz.cpp: In member function ‘virtual void LAMMPS_NS::DumpAtomGZ::write()’: ../dump_atom_gz.cpp:136: error: ‘gzFp’ was not declared in this scope ../dump_atom_gz.cpp:136: error: ‘gzclose’ was not declared in this scope ../dump_atom_gz.cpp:140: error: ‘gzFp’ was not declared in this scope ../dump_atom_gz.cpp:140: error: ‘Z_SYNC_FLUSH’ was not declared in this scope ../dump_atom_gz.cpp:140: error: ‘gzflush’ was not declared in this scope make[1]: *** [dump_atom_gz.o] Error 1 make[1]: Leaving directory /opt/lammps/src/Obj_serial’
make: *** [serial] Error 2

dear users help me to overcome this issue. Thanks in advance

The JPEG error means you did not compile LAMMPS

with support for writing JPEG images and are invoking

a dump image command.

The errors about dump_atom_gz.cpp appear to be

b/c you are compiling with the COMPRESS package

installed and the compile cannot find the zlib.h on

your system. See the doc page Section_packages.html

for the COMPRESS lib on that one.

Steve