Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

installing virtmanager fails #2423

Open
lrhazi opened this issue Dec 8, 2024 · 7 comments
Open

installing virtmanager fails #2423

lrhazi opened this issue Dec 8, 2024 · 7 comments

Comments

@lrhazi
Copy link

lrhazi commented Dec 8, 2024

Final error is:

Program gtk4-update-icon-cache found: YES (/usr/bin/gtk4-update-icon-cache)
Configuring virt-manager.spec using configuration
Program pylint pylint-3 found: NO

tests/meson.build:16:14: ERROR: Program 'pylint pylint-3' not found or not executable

A full log can be found at /tmp/virt-manager/build/meson-logs/meson-log.txt
Install data not found. Run this command in build directory root.

I think the root cause is that this command fails earlier:

pip3 install tqdm requests six urllib3 ipaddr ipaddress idna dbus-python certifi lxml cryptography pyOpenSSL chardet asn1crypto pycairo PySocks PyGObject pylint pytest

the error:

error: externally-managed-environment

× This environment is externally managed
╰─> To install Python packages system-wide, try apt install
    python3-xyz, where xyz is the package you are trying to
    install.
    
    If you wish to install a non-Debian-packaged Python package,
    create a virtual environment using python3 -m venv path/to/venv.
    Then use path/to/venv/bin/python and path/to/venv/bin/pip. Make
    sure you have python3-full installed.
    
    If you wish to install a non-Debian packaged Python application,
    it may be easiest to use pipx install xyz, which will manage a
    virtual environment for you. Make sure you have pipx installed.
    
    See /usr/share/doc/python3.12/README.venv for more information.

note: If you believe this is a mistake, please contact your Python installation or OS distribution provider. You can override this, at the risk of breaking your Python installation or OS, by passing --break-system-packages.
@doomedraven
Copy link
Collaborator

good catch, added break 8211cf9

@lrhazi
Copy link
Author

lrhazi commented Dec 8, 2024

Thank you! that fixed it. afterwards I got this error:

mohamed@mohamed-HP-EliteBook-850-G5:~/woot$ virt-manager --version
Traceback (most recent call last):
  File "/usr/local/bin/virt-manager", line 6, in <module>
    from virtManager import virtmanager
  File "/usr/local/share/virt-manager/virtManager/virtmanager.py", line 19, in <module>
    from virtinst import BuildConfig
  File "/usr/local/share/virt-manager/virtinst/__init__.py", line 50, in <module>
    from virtinst.domain import *  # pylint: disable=wildcard-import
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/share/virt-manager/virtinst/domain/__init__.py", line 5, in <module>
    from .blkiotune import DomainBlkiotune
  File "/usr/local/share/virt-manager/virtinst/domain/blkiotune.py", line 8, in <module>
    from ..xmlbuilder import XMLBuilder, XMLChildProperty, XMLProperty
  File "/usr/local/share/virt-manager/virtinst/xmlbuilder.py", line 16, in <module>
    from .xmlapi import XMLAPI
  File "/usr/local/share/virt-manager/virtinst/xmlapi.py", line 7, in <module>
    import libxml2
ModuleNotFoundError: No module named 'libxml2'
mohamed@mohamed-HP-EliteBook-850-G5:~/woot$ 
mohamed@mohamed-HP-EliteBook-850-G5:~/woot$ 

and it seems to be fixed by this command:

mohamed@mohamed-HP-EliteBook-850-G5:~/woot$ sudo aptitude install python3-libxml2
The following NEW packages will be installed:
  python3-libxml2 
0 packages upgraded, 1 newly installed, 0 to remove and 72 not upgraded.
Need to get 139 kB of archives. After unpacking 882 kB will be used.
Get: 1 http://us.archive.ubuntu.com/ubuntu noble/universe amd64 python3-libxml2 amd64 2.9.14+dfsg-1.3ubuntu3 [139 kB]
Fetched 139 kB in 0s (298 kB/s)         
Selecting previously unselected package python3-libxml2:amd64.
(Reading database ... 176243 files and directories currently installed.)
Preparing to unpack .../python3-libxml2_2.9.14+dfsg-1.3ubuntu3_amd64.deb ...
Unpacking python3-libxml2:amd64 (2.9.14+dfsg-1.3ubuntu3) ...
Setting up python3-libxml2:amd64 (2.9.14+dfsg-1.3ubuntu3) ...
                                         
mohamed@mohamed-HP-EliteBook-850-G5:~/woot$ virt-manager --version
5.0.0
mohamed@mohamed-HP-EliteBook-850-G5:~/woot$ 

@lrhazi
Copy link
Author

lrhazi commented Dec 9, 2024

next issue I have now is when trying to create a VM in virt-manager:

mohamed@mohamed-HP-EliteBook-850-G5:~$ !virt
virt-manager 
Traceback (most recent call last):
  File "/usr/local/share/virt-manager/virtManager/manager.py", line 451, in new_vm
    from .createvm import vmmCreateVM
  File "/usr/local/share/virt-manager/virtManager/createvm.py", line 31, in <module>
    from .vmwindow import vmmVMWindow
  File "/usr/local/share/virt-manager/virtManager/vmwindow.py", line 15, in <module>
    from .details.console import vmmConsolePages
  File "/usr/local/share/virt-manager/virtManager/details/console.py", line 15, in <module>
    from .viewers import SpiceViewer, VNCViewer, SPICE_GTK_IMPORT_ERROR
  File "/usr/local/share/virt-manager/virtManager/details/viewers.py", line 14, in <module>
    gi.require_version('GtkVnc', '2.0')
  File "/usr/lib/python3/dist-packages/gi/__init__.py", line 122, in require_version
    raise ValueError('Namespace %s not available' % namespace)
ValueError: Namespace GtkVnc not available
mohamed@mohamed-HP-EliteBook-850-G5:~$ 


reinstalling libvirt as suggested does not seem to fix it!

$ ./kvm-qemu.sh libvirt

@ChrisThibodeaux
Copy link
Contributor

ChrisThibodeaux commented Dec 9, 2024

@lrhazi Run sudo ./kvm-qemu.sh Issues to see common issues that can occur when running the script and their solutions. I found these when I did:

    8. Namespace Gtk not available: Could not open display: localhost:10.0
    8 ValueError: Namespace GtkSource not available
    $ aptitude install -f gir1.2-gtksource-4 libgtksourceview-4-0 libgtksourceview-4-common
    * Error will specify version, example gi.require_version("GtkSource", "4"), if that version is not available for your distro
    * you will need downgrade your virt-manager with $ sudo rm -r /usr/share/virt-manager and install older version

@lrhazi
Copy link
Author

lrhazi commented Dec 9, 2024

thanks @ChrisThibodeaux , this seems to have fixed it for me:

$ sudo aptitude install gir1.2-gtk-vnc-2.0

@lrhazi
Copy link
Author

lrhazi commented Dec 9, 2024

next issue is when trying to create a VM, it says network is not activated. but when I try to start it I get error:

mohamed@mohamed-HP-EliteBook-850-G5:~$ sudo virsh net-start default 
error: Failed to start network default
error: internal error: Child process (VIR_BRIDGE_NAME=virbr0 /usr/sbin/dnsmasq --conf-file=/var/lib/libvirt/dnsmasq/default.conf --leasefile-ro --dhcp-script=/usr/libexec/libvirt_leaseshelper) unexpected exit status 3: /usr/libexec/libvirt_leaseshelper: error while loading shared libraries: libvirt.so.0: cannot open shared object file: No such file or directory

dnsmasq: cannot run lease-init script /usr/libexec/libvirt_leaseshelper: No such file or directory


mohamed@mohamed-HP-EliteBook-850-G5:~$ 

I tried reinstalling libvirt and virtmanager, using kvm-qemu.sh, but to no avail!

@ChrisThibodeaux
Copy link
Contributor

@lrhazi The issue template is really useful for getting assistance. To help you, we need to know your distro/version, how you are running the commands, relevant info from the log files, etc. It also helps for others in your position who are searching through the tickets.

Could you edit your initial post, fill out the template, and copy/paste your original text in the Failure Logs section?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants