I am using QGIS 3.8 on Mac. When I tried to extract raster by mask layer, it gives following error and its been a while I am not able to fix this.

"GDAL command output:
/bin/sh: gdalwarp: command not found

Execution completed in 0.08 seconds
{'OUTPUT': '/var/folders/bn/d_gr7r2j03x_j9gphh4ncpz80000gn/T/processing_433a42df84c4486bb4b36bc2b3753302/27fec80e7c114dcebaba61cfe351e593/OUTPUT.tif'}

Loading resulting layers
The following layers were not correctly generated.<ul><li>/var/folders/bn/d_gr7r2j03x_j9gphh4ncpz80000gn/T/processing_433a42df84c4486bb4b36bc2b3753302/27fec80e7c114dcebaba61cfe351e593/OUTPUT.tif</li></ul>You can check the 'Log Messages Panel' in QGIS main window to find more information about the execution of the algorithm. "

What could the problem be?

1 Answer 1


The problem is that QGIS cannot find the gdalwarp utility, which does the extract by mask layer work. I'm speaking from Windows, so I am not sure if all applies to your Mac but what you need to do is check whether the path where gdalwarp is found is given in the environment variables of QGIS. So:

  • Step 1: locate gdalwarp on your Mac (probably somewhere under where you have installed QGIS)

  • Step 2: Add the path of this to your environment variables (which you can do under Settings -> Options -> System tab)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.