UBUNTU仮想マシンにgdal2.1をインストールしようとしたときのコマンドラインのシーケンスです。私の仮想マシンはUBUNTU 16.04 LTS(64bit)です。gdal2.1が必要で、特にPythonバインディングがPythonで動作する必要があります。現在インストールされているPythonのバージョンは2.7.11+です.GDALには必要であることが分かっているので、numpyをインストールしました。今、私はGDAL2.1のは、PyPIページで見UbuntuでのPython GDAL 2.1のインストール16.04
手順でコマンドライン:
[email protected]:~$ sudo apt-get install libgdal1i
libgdal1i is already the newest version (1.11.3+dfsg-3build2).
[email protected]:~$ sudo apt-get install libgdal1-dev
libgdal1-dev is already the newest version (1.11.3+dfsg-3build2).
[email protected]:~$ sudo pip install gdal
Collecting gdal Downloading GDAL-2.1.0.tar.gz (619kB) 100% |████████████████████████████████| 624kB 247kB/s
Installing collected packages: gdal
Running setup.py install for gdal ... error
Complete output from command /usr/bin/python -u -c "import setuptools,
tokenize;file='/tmp/pip-build-_sHDUY/gdal/setup.py';
exec(compile(getattr(tokenize, 'open', open)(file).read().replace('\r\n',
'\n'), file, 'exec'))" install --record /tmp/pip-eOB65J-record/install-
record.txt --single-version-externally-managed --compile:
running install
running build
running build_py
creating build
creating build/lib.linux-x86_64-2.7
copying gdal.py -> build/lib.linux-x86_64-2.7
copying ogr.py -> build/lib.linux-x86_64-2.7
copying osr.py -> build/lib.linux-x86_64-2.7
copying gdalconst.py -> build/lib.linux-x86_64-2.7
copying gdalnumeric.py -> build/lib.linux-x86_64-2.7
creating build/lib.linux-x86_64-2.7/osgeo
copying osgeo/gdal.py -> build/lib.linux-x86_64-2.7/osgeo
copying osgeo/gdalconst.py -> build/lib.linux-x86_64-2.7/osgeo
copying osgeo/osr.py -> build/lib.linux-x86_64-2.7/osgeo
copying osgeo/__init__.py -> build/lib.linux-x86_64-2.7/osgeo
copying osgeo/ogr.py -> build/lib.linux-x86_64-2.7/osgeo
copying osgeo/gdal_array.py -> build/lib.linux-x86_64-2.7/osgeo
copying osgeo/gnm.py -> build/lib.linux-x86_64-2.7/osgeo
copying osgeo/gdalnumeric.py -> build/lib.linux-x86_64-2.7/osgeo
running build_ext
building 'osgeo._gdal' extension
creating build/temp.linux-x86_64-2.7
creating build/temp.linux-x86_64-2.7/extensions
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -Wdate-time -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I../../port -I../../gcore -I../../alg -I../../ogr/ -I../../ogr/ogrsf_frmts -I../../gnm -I../../apps -I/usr/include/python2.7 -I/usr/local/lib/python2.7/dist-packages/numpy/core/include -I/usr/include -c extensions/gdal_wrap.cpp -o build/temp.linux-x86_64-2.7/extensions/gdal_wrap.o
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
extensions/gdal_wrap.cpp:3085:22: fatal error: cpl_port.h: File o directory non
esistente
compilation terminated.
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
----------------------------------------
Command "/usr/bin/python -u -c "import setuptools, tokenize;file='/tmp/pip-build-_sHDUY/gdal/setup.py';exec(compile(getattr(tokenize, 'open', open)(file).read().replace('\r\n', '\n'), file, 'exec'))" install --record /tmp/pip-eOB65J-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-_sHDUY/gdal/
は、これは私が得たものでした。 VMに他のソフトウェアやパッケージがインストールされていないと考えてください。私は
私はGISのセクションでいくつかの提案を依頼しようとしています..あなたは非常に重要であろうGDAL2.1を使用して、私を助けることができると思いますが、私は今のところ
としてのpython 2.7を使用しています - 'GDAL-2.1.0を/ .libs/libgdal.so: 'kmldom :: SerializePretty(boost :: intrusive_ptr const&) 'への未定義参照。' 'kmldom'の前にバックティックを書きますが、' const& ''の後ろに一重引用符を付けます。 。以前は 'libgdal.so'に' libpng'を必要とする 'png_set_longjmp_fn()'が必要だったので、2つのエラーが出ました。1.4+ - 基本インストールはlibpng1.2.54であるように見え、 'libpng16-エラーが消えた。 –