pkgsrc-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: ImportError: No module named libvirt

On Tue, 14 Sept 2021 at 06:38, Mario Marietto <> wrote:
> I've gone into the folder /usr/pkgsrc/wip/py-libvirt and I've issued the command "make" and the package has been compiled successfully. At this point it asked me if I wanted to remove the old version of the libvirt package that I'd installed before AND the package virt-manager. I tried to remove only the old libvirt package but I couldn't. I've been forced to remove both,but later I 've reinstalled virt-manager. At this point I've launched virt-manager,but it didn't work :
> netbsd-marietto# virt-manager
> Traceback (most recent call last):
>   File "/usr/pkg/share/virt-manager/", line 386, in <module>
>     main()
>   File "/usr/pkg/share/virt-manager/", line 247, in main
>     from virtManager import cli
>   File "/usr/pkg/share/virt-manager/virtManager/", line 29, in <module>
>     import libvirt
> ImportError: No module named libvirt
> My initial goal was to make work virt-manager,but it seems that even installing libvirt 5.8 and py-libvirt that error can't be fixed.

I built wip/virt-manager with all the dependencies (on current pkgsrc
and wip) without any problems; I can start it; after I have enabled
and started the libvirtd daemon, it creates all the necessary tree
structure under /var/run/libvirt, but when I try to connect to it with
virt-manager (as a normal user) I get access error to the sockets
created; if I open the files under that directory, it goes further and
complains that it cannot authenticate the caller.
Traceback (most recent call last):
  File "/usr/pkg/share/virt-manager/virtManager/", line
956, in _do_open, self)
  File "/usr/pkg/share/virt-manager/virtinst/", line 172, in open
    conn = libvirt.openAuth(self._open_uri,
  File "/usr/pkg/lib/python3.9/site-packages/", line 104, in openAuth
    if ret is None:raise libvirtError('virConnectOpenAuth() failed')
libvirt.libvirtError: Client socket identity not available: Function
not implemented

Perhaps I am doing something wrong; I also tried to connect to my
XCP-NG host, as there is XEN an option, but it expects libvirtd to be
running there, which it is not.

> Il giorno lun 13 set 2021 alle ore 06:55 Roland Illig <> ha scritto:
>> 13.09.2021 00:56:16 Mario Marietto <>:
>> > Hello.
>> >
>> > ok. I've renamed the folder called "pkgsrc-wip" in "wip" and I've copied it into /usr/pkg and I've used the paths below inside the Makefile file :
>> I'm sorry, I made a typo in my last mail, so let me try again.
>> To use pkgsrc and pkgsrc-wip, it is not necessary to edit any files, especially not Makefiles. The basic steps are:
>> 1. Get main pkgsrc, extract it to /usr/pkgsrc
>> 2. Get pkgsrc-wip, extract it to /usr/pkgsrc/wip
>> (My typo was that I wrote pkg instead of pkgsrc.)
>> Now you are ready to go.
> --
> Mario.


Home | Main Index | Thread Index | Old Index