Ldd can't find libgomp, libgfortran

Hi, I have problems with a snap which previously worked without a hitch.

When I start my snapped executable modor using


then it misses the libgomp library, as tested by investigating it with ldd. Similarly another application in my snapped package misses the libgfortran library.

However, I specifically add both libgomp1 and libgfortran4 as stage packages in my yaml file, and have my main part done after sorting the dependencies. Relevant parts:

    plugin: nil
      - libgomp1
      - libgfortran4
    plugin: dump
    source: ./volsung-release.tar.gz
    build-attributes: [keep-execstack]
    override-build: |
      snapcraftctl build
      - volsung-dependencies

Any suggestions please?

this is not how you start a snapped app at all :wink:

you need to define an apps: section in your snapcraft.yaml and then call the app via “snap run <snapname>.<appname>” (if snapname and appname are the same you can use only appname) or via /snap/bin/<snapname>.<appname> (again, the same as above applies if snap and app names are identical) … (note that snapd puts /snap/bin into your PATH, so just <snapname>.<appname> (or just appname for the above case) does usually also work)

the confinement, envrionment, namespaces and interfaces are only applied when you start a snap app this way …

@ogra thanks for explanation.

My main problem was that I wanted to start my snap app using an automated cron job on system restart with no user logged in. The /snap/bin/<snapname>.<appname> did not work in this instance but my above method did.

However your start run <snapname>.<appname> appears to be working, I am currently testing it thoroughly. I was not aware of this method before; it would be great if it could be added to


1 Like

@degville can we get some info about snap run <snap>.<appname> into the above doc ?