I'm running Red Hat 8, and I'm trying to install gdal 3.0.4 on it.

The commands I've excuted thus far:

wget http://download.osgeo.org/gdal/3.0.4/gdal-3.0.4.tar.gz
tar zxvf gdal-3.0.4.tar.gz
cd gdal-3.0.4
sudo make install

After I run sudo make install, I get the following error messages:

path/to/gdal-3.0.4/.libs/libgdal.so: undefined reference to `jpeg_CreateDecompress_12`
path/to/gdal-3.0.4/.libs/libgdal.so: undefined reference to `jpeg_write_tables_12`
path/to/gdal-3.0.4/.libs/libgdal.so: undefined reference to `jpeg_start_decompress_12`


It continues on like this for some amount of lines all starting with jpeg and ending with 12 and different words in between. It finally ends with:

collect2: error: ld returned 1 exit status
make[1]: *** [GNUmakefile:82: gdalinfo] Error 1
make: *** [GNUmakefile:112: apps-target] Error 2

I'm not sure what to do or what this error even means. If anyone has any ideas, or if there is anymore information I can share, let me know.

  • 1
    Probably you do not need 12 bit jpeg so disable it. If you want to have it perhaps this wiki page is still valid trac.osgeo.org/gdal/wiki/TIFF12BitJPEG – user30184 Feb 14 at 15:35
  • How do I disable it? Sorry this is my first time installing a source file, playing around with make files and trying to configure things myself. – drizzle123 Feb 14 at 15:37
  • Perhaps it is disabled by editing nmake.opt github.com/OSGeo/gdal/blob/master/gdal/nmake.opt. – user30184 Feb 14 at 16:36
  • Unfortunately that did not work. I tried commenting out everything suggested in nmake.opt, but I still get the same errors. – drizzle123 Feb 14 at 20:01

After running my commands, if you run

sudo make clean
 ./configure --with-libtiff=internal --with-geotiff=internal --with-jpeg=internal --with-jpeg12
sudo make install

Then my error cleared up. Of course, I suspect one would need the right libjpeg packages installed as well. I may have had them installed beforehand so it's something to keep in mind.


The above link was extremely useful in solving this issue.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.