0

I am trying to install "gtk-common-themes" for Snap offline on a Raspberry Pi 2B. It is imperative the device stays offline. On another Raspberry Pi 3 (online) machine, running the same OS (raspbian buster 10), I used snap download gtk-common-themes, copied the files to a USB drive, and put them on the Raspberry Pi 2. After running:

sudo snap ack gtk-common-themes_1515.assert

followed by

sudo snap ack gtk-common-themes_1515.snap

I get

error: cannot assert: cannot decode request body into assertions: parsing assertion headers: header is not utf8.

Can somebody please help me understand why this is happening? I have not had trouble with other snap packages.

3
  • You don't want to snap ack a *.snap file, you want to ack the assertion (like you did) and then sudo snap install the snap. I'm making this a comment since you may have just made a typo in the question. Commented Jul 11, 2021 at 5:43
  • @kyrofa, Wow, you're right, that was the issue. I can't believe I didn't see that myself. Thanks! Commented Jul 11, 2021 at 7:10
  • Ah, no problem, I went ahead and added an actual answer, then. Commented Jul 11, 2021 at 22:20

1 Answer 1

1

The process for installing a snap offline is as follows:

  1. Download both the snap as well as the assertion (the signed document that asserts this particular snap came from the snap store):

    $ snap download <snap name>
    
  2. Transfer both the .snap and the .assert over to the other machine.

  3. Load the assertion into snapd (so it knows that the snap you're about to install came from the store):

    $ sudo snap ack <snap name>.assert
    
  4. Finally, install the snap:

    $ sudo snap install <snap name>.snap
    

Note how you don't use --dangerous in that last command-- that's only needed if you don't have an assertion for the snap, and you have one.

It seems that you understand this process, but instead of using snap install on step 4, you're using snap ack again, which expects an assertion and isn't going to actually install a snap.

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.