2

I have updated my snap package and run a

snapcraft cleanbuild

and now tried to upload the same way as before

snapcraft push smalltextpad_1.2.3_amd64.snap

But this time I got an error:

Error while processing...
The store was unable to accept this snap.
  - package contains external symlinks: usr/lib/jvm/java-8-openjdk-amd64/jre/lib/security/cacerts

I am not sure where this error is coming from as I have not created any symlinks or changed anything apart from the actual Java program .jar file.

1
  • This issue seem to be something snapcraft is doing while building the package... I found this while building... Preparing to build smalltextpad /root/build_smalltextpad/parts/smalltextpad/install/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/security/cacerts will be a dangling symlink – gcclinux Jul 13 '18 at 17:50
1

Information taken from the Snapcraft forums.

The /usr/lib/jvm/java-8-openjdk-arm64/jre/lib/security/cacerts/ file is pointing somewhere outside your snap, which is not guaranteed to exist. In this particular case, it will prevent ssl encrypted connections like HTTPS to not work within your snap.

This is described here (with a workaround).

If you install openjdk-8-jre-headless and ca-certificates-java on your system, then when you run snapcraft, it will pull them in.

sudo apt-get install openjdk-8-jre-headless ca-certificates-java

You could also try using the following in the snapcraft.yaml file when using ‘snapcraft cleanbuild’:

build-packages:
- ca-certificates
- ca-certificates-java
- openjdk-8-jre-headless
stage-packages:
- openjdk-8-jre-headless
1
  • The issue was missing the build-packages, everything worked. Many Thanks – gcclinux Jul 14 '18 at 6:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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