4

I'm newbie with Linux and QGIS. I'm using Ubuntu 18.04 LTS and QGIS 3.0 Girona and I can't do mosaic from a raster pile because the following log error message returns:

 Processing algorithm… AlgorithmDialog Input parameters: { 'DATA_TYPE'
 : 2, 'INPUT' : '', 'NODATA_INPUT' : 0, 'NODATA_OUTPUT' : 0, 'OPTIONS'
 : '', 'OUTPUT' :
 '/tmp/processing_b9cc3491592e4af584caddae75abe2cf/d6cd346d9c534b2a9bb38c222bbc6cf4/OUTPUT.tif',
 'PCT' : False, 'SEPARATE' : False }

 GDAL command: gdal_merge.py -n 0 -a_nodata 0 -ot UInt16 -of GTiff -o
 /tmp/processing_b9cc3491592e4af584caddae75abe2cf/d6cd346d9c534b2a9bb38c222bbc6cf4/OUTPUT.tif
 --optfile /tmp/processing_b9cc3491592e4af584caddae75abe2cf/mergeInputFiles.txt
 GDAL command output: /bin/sh: 1: gdal_merge.py: not found

 Execution completed in 0.02 seconds Results: {'OUTPUT':
 <QgsProcessingOutputLayerDefinition
 {'sink':/tmp/processing_b9cc3491592e4af584caddae75abe2cf/d6cd346d9c534b2a9bb38c222bbc6cf4/OUTPUT.tif,
 'createOptions': {'fileEncoding': 'System'}}>}

I presume that the gdal_merge.py isn't installed or activated. How can I fix this problem?

OBS.: Maybe other GDAL functions have the same problem, but I have not tried yet.

  • How are you calling GDAL_Merge? It's a python script, not an executable, so it needs more system paths set; I'm not sure how to do that in Linux but it's looking for the script file and can't find it so your search path needs to be updated; on Windows QGIS is started by a script (batch file) that sets the system paths, you may need to find your QGIS script and edit it so that it can locate the merge script and also python and GDAL python bindings. – Michael Stimson May 20 '18 at 23:03
  • Please edit your question to specify how you installed QGIS 3. – user2856 May 21 '18 at 1:22
  • Luke, I followed the instructions of this page: qgis.org/en/site/forusers/alldownloads.html#debian-ubuntu – Guga Vieira May 23 '18 at 9:58
  • In the sources list I added these two lines: deb qgis.org/debian bionic main and deb-src qgis.org/debian bionic main. Next, I followed these steps: sudo apt-get update sudo apt-get install qgis python-qgis qgis-plugin-grass. As apparently there were no keyserver errors, so I stopped at these steps. – Guga Vieira May 23 '18 at 10:07
  • I'm having the same issue and probably used the same installation procedures. Did you ever resolve this? – Debaser Sep 16 '18 at 15:37
2

I had same problem on QGIS 3.10 on LinuxMint/Ubuntu 18.04

/bin/sh: 1: gdal_merge.py: not found

I solved this issue by installing the additional package: python-gdal

 sudo apt install python-gdal
| improve this answer | |
-1

In Ubuntu go to synaptic and install python-gdal and python3-gdal

| improve this answer | |
  • 1
    Welcome to the GIS Stack Exchange site, thank you for providing an answer to an unanswered question. When providing an answer please try and include as much information as possible to allow for someone to follow the instructions given. Please take the tour: gis.stackexchange.com/tour of the site it will provide some guidance on how best to provide an answer. – Keagan Allan Oct 8 '18 at 1:11

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.