Can't push because of symlinked

I can build my snap, and run it locally, but when I push it I get the error

Error while processing...
The store was unable to accept this snap.
  - package contains external symlinks: usr/lib/x86_64-linux-gnu/

So I included
- libslang2-dev
in the yaml file (just guessing) but that doesn’t help. I built my snap under Ubuntu 18.04 using core18. When I interrogate my Ubuntu 18.04 thus I get:

ll /snap/andy-testsnap-py/x1/usr/lib/x86_64-linux-gnu/
lrwxrwxrwx 1 root root 35 Feb 24  2018 /snap/andy-testsnap-py/x1/usr/lib/x86_64-linux-gnu/ -> /lib/x86_64-linux-gnu/

if that is of any help. Any ideas how I can resolve this error and successfully push? My full yaml file is:

name: andy-testsnap-py # you probably want to 'snapcraft register <name>'
version: '0.5.1' # just for humans, typically '1.2+git' or '1.3.2'
summary: Single-line elevator pitch for your amazing snap # 79 char long summary
description: |
  This is my-snap's description. You have a paragraph or two to tell the
  most important story about your snap. Keep it under 100 words though,
  we live in tweetspace and your description wants to look good in the snap

grade: devel # must be 'stable' to release into candidate/stable channels
confinement: strict # use 'strict' once you have the right plugs and slots
base: core18

        command: desktop-launch python3 $SNAP/usr/bin/
        plugs: [x11, unity7, pulseaudio, home, gsettings, network]
            LD_LIBRARY_PATH: $LD_LIBRARY_PATH:$SNAP/usr/lib/x86_64-linux-gnu/pulseaudio

    - build-essential
    - libgtk-3-dev
    - FLAVOR=gtk3
    plugin: make
    source-subdir: gtk
    - libxkbcommon0
    - ttf-ubuntu-font-family
    - dmz-cursor-theme
    - light-themes
    - adwaita-icon-theme
    - gnome-themes-standard
    - shared-mime-info
    - libgtk-3-0
    - libgdk-pixbuf2.0-0
    - libglib2.0-bin
    - libgtk-3-bin
    - unity-gtk3-module
    - libappindicator3-1
    - locales-all
    - xdg-user-dirs
    - ibus-gtk3
    - libibus-1.0-5
    - fcitx-frontend-gtk3
    # See 'snapcraft plugins'
    plugin: python
    python-version: python3
    source: .
        # - libc6
        - libssl-dev
        - libjpeg-dev
        - libtiff-dev
        - libsdl1.2-dev
        - libnotify-dev
        - freeglut3
        - ibus-gtk3
        - libwebkitgtk-3.0-0
        - zlib1g
        - libsm6
        - libpulse0
        - libcanberra-gtk-module
        - libslang2-dev
    #after: [desktop-gtk3]
    override-build: |
        snapcraftctl build
        chmod +x $SNAPCRAFT_PART_INSTALL/usr/bin/

the problem is that the symlink points to /lib/...; it’s external to the snap.

Is there something I can do to fix this situation?

As I said, I already tried including libslang2-dev in the list of “stage-packages” but that didn’t help. Is there something else I can add to “stage-packages” to make this work?

This simple demo project builds and pushes ok in plain 16.04 without the core18 approach (albeit changing the Python and wxPython to lower versions).

The fix for this was to add


(not libslang2-dev)

into the list of “stage-packages”.

After rebuilding, I was then able to push to the store OK.

1 Like