WARNING: make sure that libgif-dev has a version number greater or equal than 5. If not, remove libgif-dev and install the library from sources: https://sourceforge.net/projects/giflib/, by making:

   ./configure
   make
   sudo make install