Skip to content

Ubuntu snap not working #2972

Closed
Closed

Description

@masters3d
  • Your Windows build number: (Type ver at a Windows Command Prompt)
    Microsoft Windows [Version 10.0.16299.248]

  • What you're doing and what's happening: (Copy&paste specific commands and their output, or include screen shots)

[me@pc]$ sudo snap list
error: cannot list snaps: cannot communicate with server: Get http://localhost/v2/snaps: dial unix /run/snapd.socket: connect: no such file or directory
[me@pc]$ snap install swift
error: cannot communicate with server: Post http://localhost/v2/snaps/swift: dial unix /run/snapd.socket: connect: no such file or directory
[me@pc]$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 16.04.3 LTS
Release:        16.04
Codename:       xenial
  • What's wrong / what should be happening instead:

snap should work but is is not. This is included in the ubuntu 16 distro. https://www.ubuntu.com/desktop/snappy
Other:
https://forum.snapcraft.io/t/windows-subsystem-for-linux/216/17

Activity

  1. therealkenc commented on Feb 21, 2018

    @therealkenc

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

    Same as #2374 (message), which went dark without resolution. The title in the issue over there is unfortunate, but the take-away in the OP was quoth: "Any snap command fails" (as opposed to installation related). You don't have snapd running, so snap has no one to talk to on /run/snapd.socket. snapd doesn't start automatically after install because #994, but that is not unique to snapd. Going down the path of starting snapd manually could be taken up in the dupe issue if motivated. I gather someone made a run at it, anyway.

  2. reesericci commented on May 28, 2019

    @reesericci

    I need snap to install nextcloud

  3. JohnGalt1717 commented on Oct 28, 2019

    @JohnGalt1717

    ...And Kubernetes

  4. JohnGalt1717 commented on Oct 28, 2019

    @JohnGalt1717

    Looks like the root Kubernetes issue will be resolved with this: https://engineering.docker.com/2019/10/new-docker-desktop-wsl2-backend/

    In a few weeks.

    But snapd should be a base objective for wsl 2 before it's released given how much stuff is now only available on snaps. (and yes that means systemd running)

  5. JohnGalt1717 commented on Oct 28, 2019

    @JohnGalt1717

    Ya, well in the latest insider builds, Angular ng serve just hangs on start.... so docker remote containers don't work right, WSL doesn't work because of Angular not working, Kubernetes is a hack at best...

    Long way to go.

  6. therealkenc commented on Oct 29, 2019

    @therealkenc

    (and yes that means systemd running)

    Or a snapd that is less sensitive to existence systemd.

  7. PavelSosin-320 commented on Dec 17, 2019

    @PavelSosin-320

    Maybe, somebody knows how to install working version of helm without snap untill this issue will be corrected in WSL 2.0 ?

  8. sunliusi commented on Jul 4, 2020

    @sunliusi

    sudo apt-get update && sudo apt-get install -yqq daemonize dbus-user-session fontconfig
    sudo daemonize /usr/bin/unshare --fork --pid --mount-proc /lib/systemd/systemd --system-unit=basic.target
    exec sudo nsenter -t $(pidof systemd) -a su - $LOGNAME

    snap version

  9. JohnGalt1717 commented on Jul 6, 2020

    @JohnGalt1717

    sunliusi Yuk. It works, but why isn't this enabled by default on Ubuntu?

  10. sunliusi commented on Jul 6, 2020

    @sunliusi

    While WSL2 has many improvements, it still has some limitations

  11. kevinmahrous commented on May 19, 2021

    @kevinmahrous

    sunliusi Yay! worked. Thank you so much. :)

  12. igortas commented on May 20, 2021

    @igortas

    sunliusi Thanks it works. I've tried this and working.
    Btw I've tried this script:
    https://github.com/DamionGans/ubuntu-wsl2-systemd-script
    And after restart my wsl2 was mess

  13. thusinh1969 commented on Aug 23, 2021

    @thusinh1969

    exec sudo nsenter -t $(pidof systemd) -a su - $LOGNAME

    Not working with latest WSL2. Crashed immediately the terminal :( !!!

  14. UnlimitedBurst commented on Oct 12, 2021

    @UnlimitedBurst

    sudo apt-get update && sudo apt-get install -yqq daemonize dbus-user-session fontconfig sudo daemonize /usr/bin/unshare --fork --pid --mount-proc /lib/systemd/systemd --system-unit=basic.target exec sudo nsenter -t $(pidof systemd) -a su - $LOGNAME

    snap version

    That works. Thank you very much

  15. frastlin commented on Jan 7, 2022

    @frastlin

    Hello,
    I ran:
    "sudo apt-get update && sudo apt-get install -yqq daemonize dbus-user-session fontconfig sudo daemonize /usr/bin/unshare --fork --pid --mount-proc /lib/systemd/systemd --system-unit=basic.target exec sudo nsenter -t $(pidof systemd) -a su - $LOGNAME"
    and I'm getting:

    Get:7 https://esm.ubuntu.com/infra/ubuntu bionic-infra-updates InRelease [7,457 B]
    Err:8 https://cloud.r-project.org/bin/linux/ubuntu -cran40/ Release
      404  Not Found [IP: 2600:9000:200c:a600:6:c2d3:f940:93a1 443]
    Get:9 http://archive.ubuntu.com/ubuntu bionic-updates InRelease [88.7 kB]
    Hit:10 http://archive.ubuntu.com/ubuntu bionic-backports InRelease
    Reading package lists... Done
    E: The repository 'https://cloud.r-project.org/bin/linux/ubuntu -cran40/ Release' does not have a Release file.
    N: Updating from such a repository can't be done securely, and is therefore disabled by default.
    N: See apt-secure(8) manpage for repository creation and user configuration details.
    

    Any ideas?

    **Update:
    I restarted from powershell, now I'm getting that:
    sudo daemonize /usr/bin/unshare --fork --pid --mount-proc /lib/systemd/systemd --system-unit=basic.target

    "sudo: daemonize: command not found"
    Installing daemonize doesn't work because I can't reach the app repository.
    How does this script look, does manually installing daemonize sound like the best option here?
    https://gist.github.com/dtjm/508978

  16. adamlahbib commented on Apr 16, 2022

    @adamlahbib

    sudo apt-get update && sudo apt-get install -yqq daemonize dbus-user-session fontconfig sudo daemonize /usr/bin/unshare --fork --pid --mount-proc /lib/systemd/systemd --system-unit=basic.target exec sudo nsenter -t $(pidof systemd) -a su - $LOGNAME

    snap version

    Still works! Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions