0

I want to install intellij idea. I tried:

sudo snap install intellij-idea-community --classic 
[sudo] password for user-1099869:  
error: cannot communicate with server: 
Post http://localhost/v2/snaps/intellij-idea-community: 
dial unixtr /run/snapd.socket: connect: no such file or directory

I'd posted abut this before and was told to reinstall snapd.

I did

sudo apt autoremove --purge snapd

Then

$ sudo apt update
$ sudo apt install snapd

I tested the hello world snapd. Got the same error as before:

error: cannot communicate with server: 
Post http://localhost/v2/snaps/hello-world: 
dial unix /run/snapd.socket: connect: no such file or directory

If I try

snap version

it removes "user-10998699@localhost" and allows me to type anything even new lines, the same happens with

snap list

Someone asked if this was really Ubuntu 16.04. I'm on a chromebook where I installed Crouton. https://www.howtogeek.com/162120/how-to-install-ubuntu-linux-on-your-chromebook-with-crouton/

Update(feb 18, 2021):

systemctl start snapd.socket

gets me:

  Failed to add /run/systemd/ask-password to directory watch: 
No such file or directory
    Failed to start snapd.socket: Launch helper exited with unknown return
 code 1
    See system logs and 'systemctl status snapd.socket' for details.

I do

systemctl status snapd.socket

get:

Failed to get properties: Launch helper exited with unknown return code 1

I tried:

sudo service snapd start

got:

snapd: unrecognized service

I did:

sudo systemctl unmask snapd.service
sudo systemctl enable snapd.service

seemed to work

then

systemctl start snapd.socket

and got

Running in chroot, ignoring request.
  • 1
    Can you confirm that the snapd service is running? What do you see with snap version or snap list? –  Feb 16 '21 at 13:53
  • snap version removes user97979@local host and allows me to type anything even new lines – user1099869 Feb 16 '21 at 15:38
  • snap list does the same – user1099869 Feb 16 '21 at 15:39
  • Add information to your question, not to comments. Comments are how we ask you to improve the question so it's answerable. Is this really an Ubuntu 16.04 system? Is it stock Ubuntu? Or a "based-on" derivative? Is is customized? – user535733 Feb 16 '21 at 15:41
  • systemctl start snapd.socket requires root permissions like sudo systemctl start snapd.socket. The Running in chroot, ignoring request. error message occurred because Crouton is a chroot. Start off by debugging something simple like the hello-world snap to check if you can get any snap to run in Crouton. If not you'll have to switch from Crouton to chrx. For more info: https://askubuntu.com/a/866637/ – karel Feb 19 '21 at 12:55

1 Answers1

0

You don't have the snap service running.

Once you've installed snap (sudo apt install snapd), you've only installed snap, you haven't done anything to run it, or autostart when your computer starts up.

You also want to do:
systemctl start snapd.socket - To run snap, so you can execute commands.

systemctl enable snapd.socket - To have snap to run on startup.


I just tested by stopping snapd.socket myself (systemctl stop snapd.socket) and while the service was stopped, I experienced similar behavior to what you described.

Seth Falco
  • 171
  • 1
  • 13