anyone successfully installed snapd?

I see the same unresolved problem here https://forums.opensuse.org/showthread.php/520993-snap-problem

So I tried to install Canonical’s snap thingy… Acc to this https://snapcraft.io/docs/core/install#opensuse it is packaged for leap 42.2 and I followed the simple instructions. But it doesn’t work:

tiberiust@kitchen:~> sudo snap find
root's password:
error: cannot list snaps: cannot communicate with server: Get http://localhost/v2/find?q=: dial unix /run/snapd.socket: connect: connection refused
tiberiust@kitchen:~> 

Oh! Seems it’s trying to find a local web server which isn’t running? So:

tiberiust@kitchen:~> sudo systemctl start snapd
tiberiust@kitchen:~> sudo systemctl status snapd
● snapd.service - Snappy daemon
   Loaded: loaded (/usr/lib/systemd/system/snapd.service; disabled; vendor preset: disabled)
   Active: failed (Result: start-limit) since Thu 2017-02-23 19:03:42 GMT; 222ms ago
  Process: 2177 ExecStart=/usr/lib/snapd/snapd (code=exited, status=1/FAILURE)
 Main PID: 2177 (code=exited, status=1/FAILURE)


Feb 23 19:03:41 kitchen systemd[1]: snapd.service: Unit entered failed state.
Feb 23 19:03:41 kitchen systemd[1]: snapd.service: Failed with result 'exit-code'.
Feb 23 19:03:42 kitchen systemd[1]: snapd.service: Service hold-off time over, scheduling restart.
Feb 23 19:03:42 kitchen systemd[1]: Stopped Snappy daemon.
Feb 23 19:03:42 kitchen systemd[1]: snapd.service: Start request repeated too quickly.
Feb 23 19:03:42 kitchen systemd[1]: Failed to start Snappy daemon.
Feb 23 19:03:42 kitchen systemd[1]: snapd.service: Unit entered failed state.
Feb 23 19:03:42 kitchen systemd[1]: snapd.service: Failed with result 'start-limit'.
tiberiust@kitchen:~>

Files seem to be in place with the right permissions:

tiberiust@kitchen:/usr/lib/snapd> ls -al
total 13692
drwxr-xr-x 1 root root       52 Feb 23 18:21 .
drwxr-xr-x 1 root root    34256 Feb 23 18:21 ..
-rwxr-xr-x 1 root root    31592 Jul 15  2016 snap-confine
-rwxr-xr-x 1 root root 10375112 Aug  2  2016 snapd
-rwxr-xr-x 1 root root  3612160 Aug  2  2016 snap-exec
tiberiust@kitchen:/usr/lib/snapd> 

There’s an open bug on Launchpad with the same error message https://bugs.launchpad.net/ubuntu/+source/snapd/+bug/1631514

But before I go there I just wondered if any Leap 42.2 users are using snaps? Maybe I’m missing something simple?

If not could anyone guide me on how to debug the systemctl errors listed above?

TIA
T

Try the package from the open build service instead

https://software.opensuse.org/package/snapd

TSU

Tks tsu2 but result is exactly same with the build service version.

Anyone care to have a go at installing it? There are some useful snap packages starting to appear…

Tks/T

Fixed! I tried to start it again and then ran

journalctl --since "2 min ago"

A rather obvious error showed up:

Started Snappy daemon.
Feb 24 10:14:33 kitchen snapd[20725]: error: fatal: directory "/var/lib/snapd" must be present
Feb 24 10:14:33 kitchen systemd[1]: snapd.service: Main process exited, code=exited, status=1/FAILURE
Feb 24 10:14:33 kitchen systemd[1]: snapd.service: Unit entered failed state.
Feb 24 10:14:33 kitchen systemd[1]: snapd.service: Failed with result 'exit-code'.
Feb 24 10:14:34 kitchen systemd[1]: snapd.service: Service hold-off time over, scheduling restart.
Feb 24 10:14:34 kitchen systemd[1]: Stopped Snappy daemon.

So, just for a laugh I did:

# cd /var/lib/snapd
bash: cd: /var/lib/snapd: No such file or directory
# mkdir /var/lib/snapd



and it works!

# systemctl status snapd● snapd.service - Snappy daemon
   Loaded: loaded (/usr/lib/systemd/system/snapd.service; disabled; vendor preset: disabled)
   Active: active (running) since Fri 2017-02-24 10:16:30 GMT; 6min ago
 Main PID: 20839 (snapd)
    Tasks: 10 (limit: 512)
   CGroup: /system.slice/snapd.service
           └─20839 /usr/lib/snapd/snapd


Feb 24 10:16:30 kitchen /usr/lib/snapd/snapd[20839]: daemon.go:213: DEBUG: adding /v2/snaps/{name}
Feb 24 10:16:30 kitchen /usr/lib/snapd/snapd[20839]: daemon.go:213: DEBUG: adding /v2/interfaces
Feb 24 10:16:30 kitchen /usr/lib/snapd/snapd[20839]: daemon.go:213: DEBUG: adding /v2/assertions
Feb 24 10:16:30 kitchen /usr/lib/snapd/snapd[20839]: daemon.go:213: DEBUG: adding /v2/assertions/{assertType}
Feb 24 10:16:30 kitchen /usr/lib/snapd/snapd[20839]: daemon.go:213: DEBUG: adding /v2/events
Feb 24 10:16:30 kitchen /usr/lib/snapd/snapd[20839]: daemon.go:213: DEBUG: adding /v2/changes/{id}
Feb 24 10:16:30 kitchen /usr/lib/snapd/snapd[20839]: daemon.go:213: DEBUG: adding /v2/changes
Feb 24 10:16:30 kitchen /usr/lib/snapd/snapd[20839]: daemon.go:213: DEBUG: adding /v2/create-user
Feb 24 10:16:30 kitchen /usr/lib/snapd/snapd[20839]: daemon.go:203: DEBUG: init done in 1.260213ms
Feb 24 10:16:52 kitchen /usr/lib/snapd/snapd[20839]: daemon.go:181: DEBUG: uid=0;@ GET /v2/find?q= 406.832098ms 200
kitchen:/home/tiberiust # 



# snap findName                          Version              Developer             Notes    Summary
acestreamplayer               3.0.2-snap9          vs                    -        Ace Stream – P2P Multimedia Platform
anta-i7z                      0.1                  anta                  -        A better i7 (and now i3, i5) reporting tool for Linux
avahi                         0.6.32               ondra                 -        avahi-daemon
b1freearchiver                1.5.86.4890          claudioandre-br       -        Free file archiver and encryption software
bayam                         2.0.3                bayardpresse          -        Bayam, jeux, découvertes et activités pour enfants
bundler-mardy                 0.4-20170208-2       mardy                 -        Bundler - Structure from Motion (SfM) for Unordered Image Collections
cashbox-nextcloud             11.0.1snap3          cashbox               -        Nextcloud Server for www.cashBOX.plus
claat                         v0.7.1               simosx                -        Codelabs command line tool
cloudcompare                  2.8.1-1              cloudcompare          -        3D point cloud and mesh processing software
cmvs-mardy                    20110327-0           mardy                 -        Clustering Views for Multi-view Stereo
colmap-mardy                  2.1-2                mardy                 -        Structure-From-Motion and Multi-View Stereo
cpufreq                       008-1                anta                  -        Utilities to deal with the cpufreq Linux kernel feature
drive                         current              fireeye               -        Google Drive client for the commandline
dwarf-fortress                0.43.05              mterry                -        Dwarf world simulator
edi                           1.17                 spartatek             -        simple task manager for terminals
etcd                          3.0.17               canonical             -        Resilient key-value store by CoreOS
fancon                        0.7.0.6              hbriese               -        A highly configurable, lower overhead fan controller
foobar40                      4.1                  testuser              -        This is a test snap
gost                          2.3                  ginuerzh              -        GO Simple Tunnel
gridcoin                      head                 welike                -        Gridcoin Daemon
gron                          0.5.0-2              nhandler              -        Make JSON greppable
hello-feroz                   2.10                 feroz                 -        GNU Hello, the "hello world" snap
hello-martin                  2.10                 martin                -        GNU Hello, the "hello world" snap
hello-mpf                     2.12                 mpf                   -        GNU hello, the "hello world" snap
hello-snaps                   0.1                  darthlukan            -        A snap made using the Ubuntu Tutorial
hello-will                    2.11                 will                  -        GNU Hello, the "hello world" snap
howdoi                        20170207             simosx                -        instant coding answers via the command line
httpstat                      1.1.3                simosx                -        Curl statistics made simple
katomic                       16.12.1              kde                   -        Sokoban-like Logic Game
kbruch                        16.12.1              kde                   -        Practice exercises with fractions
kcalc                         16.12.1              kde                   -        Scientific Calculator
keepassxc                     2.1.2                keepassxreboot        -        community driven port of the windows application “Keepass Password Safe”
kernel-tracking-bugs-utility  0.7                  bjf                   -        A utility for working with and on Ubuntu Kernel tracking bugs
kgeography                    16.12.1              kde                   -        A Geography Learning Program
kmplot                        16.12.1              kde                   -        Function Plotter
kollision                     16.12.1              kde                   -        Casual ball game
konversation                  1.6.2                kde                   -        IRC client
level9                        0.13                 cibersheep            -        Interpreter for Level 9 interactive fiction games
librealsense                  1.12.0-snap1         canonical             -        librealsense
lonewolf                      19                   mterry                -        A role-playing choose-your-own-adventure game
malanhello                    2.10                 malanve               -        GNU Hello, the "hello world" snap
mdns-hostname                 0.0.1                welike                -        mDNS mini-daemon to published hostname.local
meshlab-mardy                 2016.12-0            mardy                 -        MeshLab
mountain-tapir                1.0.2                tttppp                -        Mountain Tapir Collage Maker is a tool for combining images into collages.
mve                           20170210-0           mardy                 -        Multi-View Environment
mvs-texturing-mardy           20170215-0           mardy                 -        MVS Texturing - 3D Reconstruction Texturing
netdiscover-ondra             0.3-beta             ondra                 -        netdiscover
neverbore                     5                    mterry                -        A picture logic puzzle game
nextcloud-nextant             11.0.0snap3          rmescandon            -        Nextcloud Server + search support
node-red-amd64                0.16.2               mikejac               -        Node-RED
noson                         2.3.6-SNAP1          janbar                -        The essential to control music from your SONOS devices
numnom                        1.08                 vagueentertainment    -        Math Game for Younglings
ohmygiraffe                   1.1.0a               popey                 -        oh my giraffe
okular                        16.12.1              kde                   -        Universal document viewer
openmvg                       1.1-0                mardy                 -        OpenMVG (open Multiple View Geometry)
openmvs                       0.7.0-fa0c2d8-0      mardy                 -        OpenMVS - open Multi-View Stereo reconstruction library
othersnap                     1.5                  matiasb               -        other-snap testing snap
planetlander                  1.0                  fernando-j-scherf     -        Defend planets from spacial killer rocks!
prometheus-ceph-exporter      0.1.0                giorgiodg             -        Unofficial Prometheus Ceph Exporter snap package
prometheus-haproxy-exporter   0.7.1                afreiberger           -        Prometheus haproxy_exporter for monitoring haproxy services
py-sysinfo                    0.1                  darthlukan            -        A simple Python script which displays system info.
qimo-wallpapers               2.0                  mhall119              -        Wallpapers from Qimo 2.0
rclone                        current              fireeye               -        "rsync for cloud storage"  
rclone-dev                    dev-latest           fireeye               -        rsync for cloud storage
remmina                       1.2.0-rcgit-18       remmina               -        The GTK+ Remote Desktop Client
rssnotify                     1.0                  icub3d                -        E-mail updates to a list of RSS Feeds (usually with a cron job).
screencloudplayer             1.3.3                screencloud           -        ScreenCloud Player
sentry                        8.13.0               joeborg               -        Sentry is a modern error logging and aggregation platform
simplescreenrecorder-mardy    0.3.8-3              mardy                 -        Simple Screen Recorder
slashlock                     0.5.3                wookalar              -        Easy to use file and folder encryptor
solr                          0.1                  rmescandon            -        Starts up solr as forking daemon
soracom                       0.1.8                soracom               -        Soracom CLI
soracom-console               1.0.0                soracom               -        Soracom console Web App
spreed-webrtc-snap            0.24.11-4            garywzl77             -        WebRTC audio/video calls and conferences
sup-autossh                   1.0.3                supcik                -        Auto SSH
termius-app                   1.0.4                crystalnix            -        termius-app
test-buy-snap-iii             0.1                  stephen-stewart-blah  3.00USD  A snap to test purchasing
test-buy-snap-iv              0.1                  stephen-stewart-blah  3.00USD  A snap to test purchasing
test-buy-snap-v               0.1                  stephen-stewart-blah  3.00USD  A snap to test purchasing
test-snapd-delta-refresh      1.0                  canonical             -        
testflinger-cli               0.1                  pwlars                -        testflinger-cli
theia-mardy                   0.7-110ea6c-1        mardy                 -        Theia Vision Library
thinger-maker-server          1.1.10               thinger               -        Thinger.io Internet Of Things Server
tinyproxy-snap                0.1                  garywzl77             -        a light-weight HTTP(S) proxy daemon for POSIX operating systems.
tlaplus                       1.5.3                axw                   -        The TLA Toolbox is an IDE for the TLA+ tools.
ubuntu-core-slides            1.0                  didrocks              -        Ubuntu core set of slides
ultimate-media-downloader2    1                    keshavnrj             -        Download media from various websites
unixhttp                      1                    teknoraver            -        HTTP over Unix
uq                            0.0.2-2              nhandler              -        universal (de)serializer
usb-utils                     8-1                  teknoraver            -        Linux USB utilities
verum-cli                     1.1.6                scratso               -        The official Verum CLI interface app.
vigil                         git                  radek-sprta           -        CLI application to watch sites for changes.
visualsfm-mardy               0.5.26-1             mardy                 -        A Visual Structure from Motion System
whois-snap                    0.1                  marius-quabeck        -        whois snap
writefull                     3.0.0-beta11-patch1  paraphrase            -        Writefull
wuziqi                        0.1                  xiaoguo               -        Wuziqi Game. It shows how to snap a html5 app into a snap
wuzz                          dd696dc-1            nhandler              -        interactive cli tool for HTTP inspection
youtube-dl-snap               daily                fireeye               -        YouTube Downloader
zeal-casept                   0.3.1                casept                -        Zeal is a simple offline documentation browser inspired by Dash. This is an unofficial snap package.
zerotier-one                  1.1.14               lh                    -        ZeroTier is a software-based managed Ethernet switch for planet Earth.

Seems the packager forgot to include mkdir /var/lib/snapd ???
I’ll go tell Canonical https://forums.opensuse.org/images/icons/icon6.png

Rgds/T

Recommend you submit the bug to openSUSE instead…

https://bugzilla.opensuse.org

Somneone will determine if it’s an openSUSE packaging mistake or upstream…

TSU

There already was one! I shud have checked there b4.https://forums.opensuse.org/images/icons/icon11.png I added a comment. Tks tsu2.

https://bugzilla.opensuse.org/show_bug.cgi?id=1016781

T

I installed snapd from https://software.opensuse.org/package/snapd

Then created the directory at

/var/lib/snapd

But when I run the command

snap find

I get this

error: cannot list snaps: cannot communicate with server: Get http://localhost/v2/find?q=: dial unix /run/snapd.socket: connect: no such file or directory

Your error is slightly different, yours is “no such file or directory” while his was initially “connection refused”
In any case, you should follow the same steps the OP did to gather more information, to run “systemctl snapd” to get the journal snippet, and if necessary go to the journal directly for more entries immediately preceding the error that might be relevant.

TSU

Well I installed and unistalled snapd and I always got the “no such file or directory” error.
So following your advice I ran the commands that Tiberius posted and finally start the snappy daemon.


alex@linux-mxf6:~> sudo systemctl start snapd
root's password:
alex@linux-mxf6:~> sudo systemctl status snapd
● snapd.service - Snappy daemon
   Loaded: loaded (/usr/lib/systemd/system/snapd.service; disabled; vendor preset: disabled)
   Active: active (running) since Wed 2017-03-08 00:19:50 EET; 21s ago
 Main PID: 19209 (snapd)
    Tasks: 8 (limit: 512)
   CGroup: /system.slice/snapd.service
           └─19209 /usr/lib/snapd/snapd

Mar 08 00:19:50 linux-mxf6.suse systemd[1]: Started Snappy daemon.
Mar 08 00:19:50 linux-mxf6.suse /usr/lib/snapd/snapd[19209]: cmd.go:66: DEBUG...
Mar 08 00:19:50 linux-mxf6.suse /usr/lib/snapd/snapd[19209]: snapmgr.go:373: ...
Mar 08 00:19:50 linux-mxf6.suse /usr/lib/snapd/snapd[19209]: daemon.go:250: D…µs
Mar 08 00:19:50 linux-mxf6.suse /usr/lib/snapd/snapd[19209]: daemon.go:251: s...
Mar 08 00:19:50 linux-mxf6.suse snapd[19209]: 2017/03/08 00:19:50.375984 dae....
Mar 08 00:19:50 linux-mxf6.suse /usr/lib/snapd/snapd[19209]: taskrunner.go:35...
Hint: Some lines were ellipsized, use -l to show in full.

And then I managed to install Krita with the following


snap find krita
sudo snap install krita

Success! Even though it’s a bit bizarre that I have to start the snappy daemon manually through a command.

Oh well, since it works I don’t care. Now I can have an always up-to-date Krita on Gnome without having to install all the KDE dependencies.

I tried it just to see if it works. No need to create any files for me.

I think you should do the following too.

sudo systemctl enable snapd

The command above creates a symlink from /etc/systemd/system/multi-user.target.wants/snapd.service to /usr/lib/systemd/system/snapd.service

This thread was timely for me. I wanted to know how to use Snaps in TW, & so based on a synthesis of advice i found here, these steps worked very nicely for me… using KeePassXC as example:


Installed Snap with One-Click-Install "*snapd*" from https://software.opensuse.org/package/snapd 


gooeygirl@linux-sr0s:~> **sudo systemctl enable snapd**
[sudo] password for root: 
Created symlink /etc/systemd/system/multi-user.target.wants/snapd.service → /usr/lib/systemd/system/snapd.service.


gooeygirl@linux-sr0s:~> **sudo systemctl start snapd** 


gooeygirl@linux-sr0s:~> **sudo systemctl status snapd**
● snapd.service - Snappy daemon
   Loaded: loaded (/usr/lib/systemd/system/snapd.service; enabled; vendor preset: disabled)
   Active: active (running) since Tue 2017-09-05 16:55:54 AEST; 10s ago
 Main PID: 19524 (snapd)
    Tasks: 7 (limit: 4915)
   CGroup: /system.slice/snapd.service
           └─19524 /usr/lib/snapd/snapd


Sep 05 16:55:54 linux-sr0s systemd[1]: Starting Snappy daemon...
Sep 05 16:55:54 linux-sr0s snapd[19524]: 2017/09/05 16:55:54.267558 daemon.go:252: started snapd/2.27.5-1.2 (series 16; classic; devmode) opensuse/20170730 (amd64
Sep 05 16:55:54 linux-sr0s systemd[1]: Started Snappy daemon.


gooeygirl@linux-sr0s:~> **snap find keepassxc**
Name       Version  Developer       Notes  Summary
keepassxc  2.2.0    keepassxreboot  -      community driven port of the windows application “Keepass Password Safe”


gooeygirl@linux-sr0s:~> **sudo snap install keepassxc**
2017-09-05T16:58:59+10:00 INFO Waiting for restart...
keepassxc 2.2.0 from 'keepassxreboot' installed


gooeygirl@linux-sr0s:~> **snap list**
Name       Version     Rev   Developer       Notes
core       16-2.26.14  2462  canonical       core
keepassxc  2.2.0       23    keepassxreboot  -


gooeygirl@linux-sr0s:~> gooeygirl@linux-sr0s:~> **snap run keepassxc**


<<keepassxc snap successfully runs>> 

Thank you to all above who did the hard work for me :slight_smile: