Compile gdal-2.4.3 on CentOS 7


Step 1: Make sure you have the following packages on CentOS 7

yum install gcc-c++
yum install gcc
yum install libpng
yum install libtiff

Step 2: Compile and Install Proj-5.2.0
a. Download Source from http://download.osgeo.org/proj/

# wget https://download.osgeo.org/proj/proj-5.2.0.tar.gz
# tar -zvxf proj-5.2.0.tar.gz
# cd proj-5.2.0
# ./configure --prefix=/usr/local/proj-5.2.0
# make -j 16
# make install

Step 3: Compile and Install gdal-2.4.3

# wget http://download.osgeo.org/gdal/2.4.3/gdal-2.4.3.tar.gz
# tar -zxvf gdal-2.4.3.tar.gz
# cd gdal-2.4.3
# ./configure --prefix=/usr/local/gdal-2.4.3 --with-proj=/usr/local/proj-5.2.0 LDFLAGS="-L/usr/local/proj-5.2.0/lib" 
CPPFLAGS="-I/usr/local/proj-5.2.0/include" --with-threads --with-libtiff=internal --with-geotiff=internal --with-jpeg=internal --with-gif=internal --with-png=internal --with-libz=internal
# make -j 16
# make install

References:

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.