I'm trying to install a Python package GDAL http://trac.osgeo.org/gdal/wiki/GdalOgrInPython.
I've successfully installed the dependencies: Python 2.7.8, Numpy 1.8.2, libgdal 1.10.0, and gdal-devel. However, when I use this command:
pip install GDAL==1.10.0
I got some errors:
gcc -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I../../port -I../../gcore -I../../alg -I../../ogr/ -I/usr/local/include/python2.7 -I/root/.local/lib/python2.7/site-packages/numpy/core/include -I/usr/local/include -c extensions/gdal_wrap.cpp -o build/temp.linux-x86_64-2.7/extensions/gdal_wrap.o
gcc: extensions/gdal_wrap.cpp: C++ compiler not installed on this system
error: command 'gcc' failed with exit status 1
Here is my system information:
# lsb_release -a
LSB Version: :core-4.0-amd64:core-4.0-ia32:core-4.0-noarch:graphics-4.0-amd64:graphics-4.0-ia32:graphics-4.0-noarch:printing-4.0-amd64:printing-4.0-ia32:printing-4.0-noarch
Distributor ID: CentOS
Description: CentOS release 5.10 (Final)
Release: 5.10
Codename: Final
# cat /proc/version
Linux version 2.6.18-274.el5 ([email protected]) (gcc version 4.1.2 20080704 (Red Hat 4.1.2-50)) #1 SMP Fri Jul 22 04:43:29 EDT 2011
And my compiler information:
# gcc --version
gcc (GCC) 4.4.6 Copyright (C) 2010 Free Software Foundation, Inc.
# g++ --version
g++ (GCC) 4.1.2 20080704 (Red Hat 4.1.2-54) Copyright (C) 2006 Free Software Foundation, Inc.
I also tried to use:
# pip install --no-install GDAL==1.10.0
# cd /tmp/pip_build_root/GDAL && python setup.py build
But it leaded to the same errors.
Finally, I tried to build it from source by:
# ./configure --with-python
# make
# make install
Unfortunately, the same errors still appeared.
I have no idea about that. Could you give me some hints? Thanks.