5

Using gdalwarp I get the following errors:

ERROR 1: libgrass_dgl.7.2.0.so: cannot open shared object file: No such file or directory ERROR 1: libgrass_vector.7.2.0.so: cannot open shared object file: No such file

The full command line I'm using is: gdalwarp f1.tif f2.tif -te -3.0 4.7 1.2 11.1

I'm using a Kubuntu 17.04 platform. If I look in folder /usr/lib/grass72/lib these files are present. But gdalwarp can't find them. How do I correct this?

2 Answers 2

8

I had the same issue. Might be a bug in gdal configuration or something. To fix it, do this:

sudo ln -s /usr/lib/grass72/lib/libgrass_* /usr/lib/

3
  • Thanks this seems to work. Can you perhaps add a quick explanation of what this is doing and why it works?
    – dww
    Dec 27, 2017 at 2:39
  • ln: failed to create symbolic link '/usr/lib/libgrass_*': File exists May 6, 2022 at 7:10
  • @CoderGuy123, that means you have the files (or the symlinks) in the right place Dec 19, 2022 at 16:40
1

Within a shell session, you can use the LD_LIBRARY_PATH environment variable to define more library paths.

If LD_LIBRARY_PATH is not set, then to this:

export LD_LIBRARY_PATH=/usr/lib/grass74/lib

If this works (e.g. using gdalwarp doesn't raise the errors), then you can make this configuration work permanently system-wide:

echo '/usr/lib/grass74/lib' | sudo tee /etc/ld.so.conf.d/libgrass.conf
sudo ldconfig
1
  • Yep, that would work as well. In fact your solution is probably the more proper one. Dec 19, 2022 at 16:42

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.