Search code examples
pythonmacosvirtual-machinevirtualizationmacos-monterey

Receiving errors when trying to install virt-manager on MacOS monterey


I have been trying to install virt-manager on macOS Monterey. I have ran these commands: brew install libvirt

brew tap arthurk/homebrew-virt-manager

brew install virt-manager virt-viewer

during installation I received the following errors:

    /opt/homebrew/Library/Homebrew/shims/mac/super/pkg-config --print-errors --atleast-version=0.9.11 libvirt
    /opt/homebrew/Cellar/virt-manager/3.2.0_3/libexec/bin/python3.9 generator.py libvirt /opt/homebrew/Cellar/libvirt/8.1.0/share/libvirt/api/libvirt-api.xml
    Found 493 functions in /opt/homebrew/Cellar/libvirt/8.1.0/share/libvirt/api/libvirt-api.xml
    Found 0 functions in libvirt-override-api.xml
    Generated 402 wrapper functions
    Missing type converters:
    virTypedParameterPtr:1
    int *:1
    ERROR: failed virDomainSetLaunchSecurityState
    ERROR: failed virNodeDeviceGetAutostart
    error: command '/opt/homebrew/Cellar/virt-manager/3.2.0_3/libexec/bin/python3.9' failed with exit code 1
    Running setup.py install for libvirt-python: finished with status 'error'
ERROR: Command errored out with exit status 1: /opt/homebrew/Cellar/virt-manager/3.2.0_3/libexec/bin/python3.9 -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/tmp/virt-manager--libvirt-python-20220311-26573-1hgf5gt/libvirt-python-7.3.0/setup.py'"'"'; file='"'"'/private/tmp/virt-manager--libvirt-python-20220311-26573-1hgf5gt/libvirt-python-7.3.0/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(file) if os.path.exists(file) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code =
f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record /private/tmp/pip-record-cyrsgth9/install-record.txt --single-version-externally-managed --compile --install-headers /opt/homebrew/Cellar/virt-manager/3.2.0_3/libexec/include/site/python3.9/libvirt-python Check the logs for full command output.
WARNING: You are using pip version 21.3.1; however, version 22.0.4 is available.
You should consider upgrading via the '/opt/homebrew/Cellar/virt-manager/3.2.0_3/libexec/bin/python3.9 -m pip install --upgrade pip' command.

If reporting this issue please do so at (not Homebrew/brew or Homebrew/core):
  https://github.com/arthurk/homebrew-virt-manager/issues

I've tried source for .bash_profile however couldn't find file, so I tried creating .bash_profile however after source the file still couldn't be found.

.bash_profile:1: no such file or directory: export PATH=/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/homebrew/opt/python@3.9/Frameworks/Python.framework/Versions/3.9/bin
baris@pc-12-151 ~ % ls -a 
.               Documents
..              Downloads
.CFUserTextEncoding     Library
.DS_Store           Movies
.Trash              Music
.bash_profile           Parallels
.runelite           Pictures
.zprofile           Public
.zsh_history            get-pip.py
.zsh_sessions           jagex_cl_oldschool_LIVE.dat
Applications (Parallels)    jagexcache
Desktop             random.dat
baris@pc-12-151 ~ % source .runelite
source: no such file or directory: .runelite
baris@pc-12-151 ~ % nano .zprofile

Solution

  • There is an error as of current on macOS Monterey. There is a PR available that resolves the problem and for now I tested it on Intel mac and it works.

    Here are the commands:

    brew untap jeffreywildman/homebrew-virt-manager
    brew tap rombarcz/homebrew-virt-manager
    brew install virt-manager
    

    Here is also the pr:

    https://github.com/Krish-sysadmin/homebrew-virt-manager/pull/2