Skip to content

Error: Get "http://unix.socket/1.0": if launch lxc list #28

Answered by ganto
diashtrih asked this question in Q&A
Discussion options

You must be logged in to vote

The LXD_SOCKET environment variable must be set to /run/lxd.socket. By default this is achieved by sourcing /etc/profile.d/lxd.sh. If this file is missing or your shell or application is not loading it, you must manually set the variable.

$ lxc list
Error: Get "http://unix.socket/1.0": dial unix /var/lib/lxd/unix.socket: connect: no such file or directory
$ cat /etc/profile.d/lxd.sh 
# /etc/profile.d/lxd.sh - Set LXD socket path

LXD_SOCKET=/run/lxd.socket
export LXD_SOCKET
$ . /etc/profile.d/lxd.sh 
$ lxc list
+------+-------+------+------+------+-----------+
| NAME | STATE | IPV4 | IPV6 | TYPE | SNAPSHOTS |
+------+-------+------+------+------+-----------+

Replies: 3 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by ganto
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #15 on October 15, 2023 15:54.