I am pretty new to python and Linux so my knowledge is still rather small. I work on a virtual machine via vncviewer on GNOME 64bit. I try to use the gdal_merge.py script on three colour bands of .jp2 format (RGB). My code looks like this:
[root@test ~]$ alias gdalmerge=/root/anaconda2/pkgs/gdal-2.1.0-py27_0/bin/gdal_merge.py
[root@test ~]$ gdalmerge -o /path/foo.tif -separate /path/red_band.jp2 /path/green_band.jp2
/path/blue_band.jp2
This is what a colleague of mine showed me. On his machine it works fine, however, I get an error when running it. He already tried to help me but with no success. Here is what the error message looks like:
Traceback (most recent call last):
File "/root/anaconda2/pkgs/gdal-2.1.0-py27/bin/gdal_merge.py", line 37, in <module>
from osgeo import gdal
File "/root/anaconda2/python2.7/site-packages/osgeo/__init__.py", line 21, in <module>
_gdal = swig_import_helper()
File "/root/anaconda2/python2.7/site-packages/osgeo/__init__.py", line 17, in swig_import_helper
_mod = imp.load_module('_gdal', fp, pathname, description)
ImportEror: libgeos-3.5.0.so: cannot open shared object file: No such file or directory
I've seen some related questions about the libgeos.so not being found but unfortunately their solutions didn't help me (e.g. https://github.com/conda-forge/fiona-feedstock/issues/21 or https://github.com/ContinuumIO/anaconda-issues/issues/584). I know the libgeos-3.5.0.so
is saved in /root/anaconda2/pkgs/geos-3.5.0-0/lib/
so why can't it be found by the system? And how can I solve this issue?
Any help is highly appreciated
fvivian