5

I am trying to follow Getting set up instructions for installing Snapcraft on Ubuntu 14.04 (the document is ambiguous about 14.04 and 16.04, but 1.x installation procedure seems to be exactly the same).

I follow the steps, get no error, however I cannot get snapcraft installed.

  • Check the version:

    $ lsb_release -a
    No LSB modules are available.
    Distributor ID: Ubuntu
    Description:    Ubuntu 14.04.4 LTS
    Release:    14.04
    Codename:   trusty
    
  • Add the repository:

    $ sudo apt-add-repository ppa:snappy-dev/tools
    ...
    OK
    
  • Run update:

    $ sudo apt update
    ... (altogether 57 lines, no error) ...
    Reading package lists... Done
    
  • Install snappy-tools

    Reading package lists... Done
    Building dependency tree
    Reading state information... Done
    The following extra packages will be installed:
      android-tools-adb android-tools-fastboot apparmor-easyprof binfmt-support click-reviewers-tools click-ubuntu-policy
      debsig-verify kpartx libxmltok1 python3-apparmor python3-bs4 python3-html5lib python3-libapparmor python3-lxml python3-magic
    Preparing to unpack .../snappy-tools_10_amd64.deb ...
    Unpacking snappy-tools (10) ...
    Processing triggers for ureadahead (0.100.0-19) ...
    Processing triggers for systemd (225-1ubuntu9) ...
    Processing triggers for man-db (2.7.4-1) ...
    Setting up binfmt-support (2.1.5-1) ...
    Setting up python3-lxml (3.4.4-1) ...
    Setting up python3-magic (1:5.22+15-2ubuntu1) ...
    Setting up python3-simplejson (3.7.3-1ubuntu1) ...
    Setting up python3-xdg (0.25-4) ...
    Setting up click-reviewers-tools (0.34) ...
    Setting up libxmltok1 (1.2-3build3) ...
    Setting up debsig-verify (0.13) ...
    Setting up python3-bs4 (4.3.2-2ubuntu4) ...
    Setting up python3-html5lib (0.999-3build1) ...
    Setting up qemu-user-static (1:2.3+dfsg-5ubuntu9.2) ...
    Setting up seccomp (2.2.3-2ubuntu1) ...
    Setting up snappy-remote (0.4-0ubuntu1build1) ...
    # -*- mode: ruby -*-
    Setting up android-tools-adb (4.2.2+git20130218-3ubuntu42) ...
    Setting up android-tools-fastboot (4.2.2+git20130218-3ubuntu42) ...
    Setting up click-ubuntu-policy (0.1) ...
    Setting up kpartx (0.5.0-7ubuntu7.1) ...
    Setting up ubuntu-snappy-cli (1.5ubuntu1) ...
    Warning: The home dir /nonexistent you specified can't be accessed: No such file or directory
    Adding system user `snappypkg' (UID 115) ...
    Adding new group `snappypkg' (GID 121) ...
    Adding new user `snappypkg' (UID 115) with group `snappypkg' ...
    Not creating home directory `/nonexistent'.
    Setting up ubuntu-device-flash (0.31-0ubuntu1) ...
    Setting up ubuntu-core-security-seccomp (15.10.17) ...
    Setting up python3-libapparmor (2.10-0ubuntu6) ...
    
  • Verify the installation:

    $ which snappy
    /usr/bin/snappy
    $ which snappy-remote
    /usr/bin/snappy-remote
    $ which snapcraft
    $ snapcraft
    snapcraft: command not found
    $ find / -name snapcraft 2> /dev/null
    $
    

Am I missing something here?

Also snappy and snappy-remote although being installed give an error:

$ snappy try
Unknown command `try'. Please specify one command of: booted, build, config, firstboot, hw-assign, hw-info, hw-unassign, info, install, internal-run-hooks, internal-unpack, list, login, purge, remove, rollback, search, set, update or versions
$ snappy-remote
the required flag `--url' was not specified
5
  • Let us continue this discussion in chat. Commented Mar 7, 2016 at 13:58
  • 1
    As Mohit told in the chat, you didn't paste the whole output of snappy-tools install so that we can help you. Please try: apt-cache policy snapcraft; apt install snapcraft and paste both outputs here.
    – didrocks
    Commented Mar 7, 2016 at 15:41
  • @didrocks Yes, you can help me without the full output of snappy-tools install (which I include anyway). Actually you even provided an answer. The manual I referenced does not mention snapcraft as being separate package and clearly says I "will get (it) after installation" of snappy-tools. Of course apt install snapcraft did install it.
    – techraf
    Commented Mar 7, 2016 at 15:52
  • Ok, thanks for your feedback! I have written a proper answer until I fix it in the distro, do you mind accepting it so that people can get to it easily? Thanks :)
    – didrocks
    Commented Mar 7, 2016 at 20:28
  • Currently, the page snapcraft.io/docs/build-snaps doesn't provide instructions for 14.04 any more. Seems that it is too difficult to support 14.04.
    – koppor
    Commented Dec 7, 2016 at 23:08

2 Answers 2

2

It seems that we have a bug in our packaging metadata for 14.04. This is going to be fixed, but if you encounter that case, just ensure that snapcraft is installed:

sudo apt install snapcraft

As long as snappy try and snappy-remote gives some output, it means they are installed. We will switch them with --help in future release as the error they trigger without any argument can be puzzling.

2
  • 1
    More important than --help for snappy-tools would be -v / --version.
    – techraf
    Commented Mar 8, 2016 at 0:07
  • 1
    Good idea, wil do this.
    – didrocks
    Commented Mar 8, 2016 at 13:03
2

Snapcraft can be also installed with snap itself:

sudo snap install snapcraft

I don't know if it is a preffered way over apt or not though.

1
  • This is indeed now the preferred way to install snapcraft.
    – popey
    Commented May 8, 2019 at 12:56

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .