Package not found, libgdal32

When trying to address this error:

./TdhOGR: error while loading shared libraries: libgdal.so.32: cannot open shared object file: No such file or directory

I add the libgdal32 package to the ymal:

tdhogr:
    plugin: dump
    source: TdhOGR_linux64.zip
    stage-packages:
     - gdal-bin
     - libgdal-dev
     - libgdal32
#     - libcurl4
#     - libproj22
#     - libblas3
    organize:
        usr/lib/*-linux-gnu/blas/*: usr/lib/
        usr/lib/*-linux-gnu/lapack/*: usr/lib/
    after:
      - wxwidgets-sdk```

Then I get this error when running snapcraft:

Stage package not found in part ‘tdhogr’: libgdal32.

I have libgdal32 installed:
![Screenshot from 2024-03-28 07-31-10|690x310](upload://xCUYRh6aeSJfB3y5adEe6GIcNag.png)

So why can't snapcraft find libgdal32? 
Or how else can I solve the original problem?

Thank you.

It only exists in 23.04 Ubuntu – Package Search Results -- libgdal32

There are other versions depending on what core you’re using Ubuntu – Package Search Results -- libgdal

I am using Ubuntu 22.04 and core22. I was automatically updated to libgdal32. I can reinstall libgdal30, but if I uninstall libgdal32 it uninstalls libgdal-dev, which i need to compile the app.

I build the app using pkg-config --libs gdal, which I suppose sets the build to use the latest version of libgdal. Maybe a solution is to make the build use the libgdal30 version? Any advice on how to do that?

success. I removed pkg-config --libs gdal and linked to /usr/lib/libgdal.so.30

1 Like