SamBouwer / any-docker

Dockerized all-in-one instance of an anytype node
MIT License
67 stars 7 forks source link

WSL : cannot communicate with server snapcraft #22

Closed Shampra closed 1 year ago

Shampra commented 1 year ago

Trying to build clients, following readme.

On make setup-dev-env, I have this error :

+ sudo snap install snapcraft --classic
error: cannot communicate with server: Post "http://localhost/v2/snaps/snapcraft": dial unix /run/snapd.socket: connect: no such file or directory
make: *** [Makefile:53: setup-dev-env] Error 1

Environment :

(and after that, if I launch make build-client-win, it crash, I'm not sure if it's related to this issue or independent) image

SamBouwer commented 1 year ago

Do you have systemd enabled in WSL? If not, or if unsure, check this post:

https://askubuntu.com/questions/1379425/system-has-not-been-booted-with-systemd-as-init-system-pid-1-cant-operate/1379567#1379567

I have systemd enabled on my installation and snap installs fine.

SamBouwer commented 1 year ago

See also these comments in the readme:

ℹī¸ Note: if you are running this in WSL, make sure to add the following lines to /etc/wsl.conf to ensure snap can be installed:

[boot]
systemd=true

Then run wsl.exe --shutdown

Shampra commented 1 year ago

I've already check that too 😞. I'll delve into it further as soon as I can.

SamBouwer commented 1 year ago

Check if you need to upgrade to npm 16 btw! You seem to be running node 12. I noticed I was on node 10 for a while and that cause A LOT of issues :P. I use nvm now to manage node and npm versions, but seeing your level of experience I guess you are already familiar with that :).

Shampra commented 1 year ago

I use nvm now to manage node and npm versions, but seeing your level of experience I guess you are already familiar with that :).

😅 I would like to, but no, I'm starting to work on AT. In development, I mainly use C# with Visual Studio. JS, Linux, Git, I had very basic knowledge.

Ticket closed, it's works. What I've done, for reference :