Resolve 'package contains external symlinks' error when trying to snap

Thank you @ogra for your response. I’m still somewhat of a beginner with snapcraft. I have added the build packages that @kz6fittycent mentioned above, but the absolute path based symlink remains, and it points outside the snap and to a file that doesn’t exist on my system.

One option that seems to work for me is to delete that symlink. I’m not sure if it’s the best solution, but since it doesn’t point to a valid file I’m not sure it if will hurt. I agree the right answer is to get that file within the snap and have the symlink point to it.

But, as a workaround, you can delete the invalid symlink via the following:

override-prime: |
       snapcraftctl prime
      rm -vf usr/lib/jvm/java-11-openjdk-*/lib/security/blacklisted.certs

Thoughts?

3 Likes