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

Not installing macOS Monterey #188

Open
advik-student-dev opened this issue Jan 9, 2022 · 3 comments
Open

Not installing macOS Monterey #188

advik-student-dev opened this issue Jan 9, 2022 · 3 comments

Comments

@advik-student-dev
Copy link

MacBook Air 2017

The error after running - brew tap jeffreywildman/homebrew-virt-manager
brew install virt-manager virt-viewer

(back to back ofc)

/usr/local/Cellar/virt-manager/2.2.1_3/libexec/bin/pip install -v --no-deps --no-binary :all: --ignore-installed /private/tmp/virt-manager--
Last 15 lines from /Users/adviksharma/Library/Logs/Homebrew/virt-manager/02.pip:
warnings.warn(
running build
/usr/local/Homebrew/Library/Homebrew/shims/mac/super/pkg-config --print-errors --atleast-version=0.9.11 libvirt
/usr/local/Cellar/virt-manager/2.2.1_3/libexec/bin/python3.9 generator.py libvirt /usr/local/Cellar/libvirt/7.10.0_1/share/libvirt/api/libvirt-api.xml
Found 492 functions in /usr/local/Cellar/libvirt/7.10.0_1/share/libvirt/api/libvirt-api.xml
Found 0 functions in libvirt-override-api.xml
Generated 401 wrapper functions
Missing type converters:
char ***:1
int *:1
ERROR: failed virDomainGetMessages
ERROR: failed virNodeDeviceGetAutostart
error: command '/usr/local/Cellar/virt-manager/2.2.1_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: /usr/local/Cellar/virt-manager/2.2.1_3/libexec/bin/python3.9 -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/tmp/virt-manager--libvirt-python-20220109-11944-ny5kj2/libvirt-python-6.10.0/setup.py'"'"'; file='"'"'/private/tmp/virt-manager--libvirt-python-20220109-11944-ny5kj2/libvirt-python-6.10.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-2adesqcw/install-record.txt --single-version-externally-managed --compile --install-headers /usr/local/Cellar/virt-manager/2.2.1_3/libexec/include/site/python3.9/libvirt-python Check the logs for full command output.

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

These open issues may also help:
virt-manager installation error #184
virt-manager: command not found #177
virt-manager crashed when opening a VM on remote host #180
Error installing virt-manager #145
virt-manager: command not found #169
bump virt-manager/view-viewer and deps #166
virt-manager broken on Big Sur after minor update #170
osx virt-manager console screen is black #113
Assertion Error When Running Virt-Manager on MacOS BigSur #174
Virt-manager wont build. Update to libvirt-python #171
cannot install virt-manager, error with python version despite having python 3.9 installed #172
virt-manager crashing with Python quit unexpectedly while using the libgdk-3.0.dylib #62

@Damenly
Copy link

Damenly commented Jan 13, 2022

These open issues may also help:
virt-manager installation error #184

Please see the issue.

@montao
Copy link

montao commented Mar 20, 2022

Got a similar error msg


Last 15 lines from /Users/niklrose/Library/Logs/Homebrew/virt-manager/02.pip:
    Found 493 functions in /usr/local/Cellar/libvirt/8.1.0/share/libvirt/api/libvirt-api.xml
    Found 0 functions in libvirt-override-api.xml
    Generated 401 wrapper functions
    Missing type converters:
    char ***:1
    virTypedParameterPtr:1
    int *:1
    ERROR: failed virDomainGetMessages
    ERROR: failed virDomainSetLaunchSecurityState
    ERROR: failed virNodeDeviceGetAutostart
    error: command '/usr/local/Cellar/virt-manager/2.2.1_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: /usr/local/Cellar/virt-manager/2.2.1_3/libexec/bin/python3.9 -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/tmp/virt-manager--libvirt-python-20220320-35392-1ouk1ed/libvirt-python-6.10.0/setup.py'"'"'; __file__='"'"'/private/tmp/virt-manager--libvirt-python-20220320-35392-1ouk1ed/libvirt-python-6.10.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-z0odwpc1/install-record.txt --single-version-externally-managed --compile --install-headers /usr/local/Cellar/virt-manager/2.2.1_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 '/usr/local/Cellar/virt-manager/2.2.1_3/libexec/bin/python3.9 -m pip install --upgrade pip' command.

@ulm0
Copy link

ulm0 commented Apr 18, 2022

I followed @J-Siu 's comment with a little twist, had to update libvirt-python to 8.2.0

class VirtManager < Formula
  include Language::Python::Virtualenv

  desc "App for managing virtual machines"
  homepage "https://virt-manager.org/"
  url "https://virt-manager.org/download/sources/virt-manager/virt-manager-3.2.0.tar.gz"
  sha256 "2b6fe3d90d89e1130227e4b05c51e6642d89c839d3ea063e0e29475fd9bf7b86"
  revision 3

  depends_on "intltool" => :build
  depends_on "pkg-config" => :build

  depends_on "adwaita-icon-theme"
  depends_on "gtk+3"
  depends_on "gtk-vnc"
  depends_on "gtksourceview4"
  depends_on "hicolor-icon-theme"
  depends_on "libosinfo"
  depends_on "libvirt"
  depends_on "libvirt-glib"
  depends_on "libxml2" # need python3 bindings
  depends_on "osinfo-db"
  depends_on "py3cairo"
  depends_on "pygobject3"
  depends_on "python"
  depends_on "spice-gtk"
  depends_on "vte3"
  depends_on "docutils"

  resource "libvirt-python" do
    url "https://libvirt.org/sources/python/libvirt-python-8.2.0.tar.gz"
    sha256 "f8b8cea67ff0d64d63029cc3410a4656e04ee9f26837a856bc0c287da55d053a"
  end

  resource "idna" do
    url "https://pypi.io/packages/source/i/idna/idna-2.8.tar.gz"
    sha256 "c357b3f628cf53ae2c4c05627ecc484553142ca23264e593d327bcde5e9c3407"
  end

  resource "certifi" do
    url "https://pypi.io/packages/source/c/certifi/certifi-2019.11.28.tar.gz"
    sha256 "25b64c7da4cd7479594d035c08c2d809eb4aab3a26e5a990ea98cc450c320f1f"
  end

  resource "chardet" do
    url "https://pypi.io/packages/source/c/chardet/chardet-3.0.4.tar.gz"
    sha256 "84ab92ed1c4d4f16916e05906b6b75a6c0fb5db821cc65e70cbd64a3e2a5eaae"
  end

  resource "urllib3" do
    url "https://pypi.io/packages/source/u/urllib3/urllib3-1.25.7.tar.gz"
    sha256 "f3c5fd51747d450d4dcf6f923c81f78f811aab8205fda64b0aba34a4e48b0745"
  end

  resource "requests" do
    url "https://pypi.io/packages/source/r/requests/requests-2.22.0.tar.gz"
    sha256 "11e007a8a2aa0323f5a921e9e6a2d7e4e67d9877e85773fba9ba6419025cbeb4"
  end

  # virt-manager doesn't prompt for password on macOS unless --no-fork flag is provided
  #patch :DATA

  def install
    venv = virtualenv_create(libexec, "python3")
    venv.pip_install resources

    # virt-manager uses distutils, doesn't like --single-version-externally-managed
    system "#{libexec}/bin/python", "setup.py",
                     "configure",
                     "--prefix=#{libexec}"
    system "#{libexec}/bin/python", "setup.py",
                     "--no-user-cfg",
                     "--no-update-icon-cache",
                     "--no-compile-schemas",
                     "install"

    # install virt-manager commands with PATH set to Python virtualenv environment
    bin.install Dir[libexec/"bin/virt-*"]
    bin.env_script_all_files(libexec/"bin", :PATH => "#{libexec}/bin:$PATH")

    share.install Dir[libexec/"share/man"]
    share.install Dir[libexec/"share/glib-2.0"]
    share.install Dir[libexec/"share/icons"]
  end

  def post_install
    # manual schema compile step
    system "#{Formula["glib"].opt_bin}/glib-compile-schemas", "#{HOMEBREW_PREFIX}/share/glib-2.0/schemas"
    # manual icon cache update step
    system "#{Formula["gtk+3"].opt_bin}/gtk3-update-icon-cache", "#{HOMEBREW_PREFIX}/share/icons/hicolor"
  end

  test do
    system "#{bin}/virt-manager", "--version"
  end
end
__END__
diff --git a/virt-manager b/virt-manager
index 15d5109..8ee305a 100755
--- a/virt-manager
+++ b/virt-manager
@@ -151,7 +151,8 @@ def parse_commandline():
         help="Print debug output to stdout (implies --no-fork)",
         default=False)
     parser.add_argument("--no-fork", action="store_true",
-        help="Don't fork into background on startup")
+        help="Don't fork into background on startup",
+        default=True)

     parser.add_argument("--show-domain-creator", action="store_true",
         help="Show 'New VM' wizard")

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

4 participants