jeffreywildman / homebrew-virt-manager

A set of homebrew formulae to install virt-manager and virt-viewer on MAC OSX
1k stars 266 forks source link

virt-manager broken on Big Sur after minor update #170

Open DerBunteBall opened 3 years ago

DerBunteBall commented 3 years ago

Hi all,

I'm not able to get virt-manager working again on macOS Big Sur since last minor update.

Reinstalling (brew reinstall virt-manager virt-viewer) gives this:

Last 15 lines from /Users/.../Library/Logs/Homebrew/virt-manager/02.pip:
  Found link https://files.pythonhosted.org/packages/03/41/6da553f689d530bc2c337d2c496a40dc9c0fdc6481e5df1f3ee3b8574479/pip-20.3.tar.gz#sha256=9ae7ca6656eac22d2a9b49d024fc24e00f68f4c4d4db673d2d9b525c3dea6e0e (from https://pypi.org/simple/pip/) (requires-python:>=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*), version: 20.3
  Found link https://files.pythonhosted.org/packages/ab/11/2dc62c5263d9eb322f2f028f7b56cd9d096bb8988fcf82d65fa2e4057afe/pip-20.3.1-py2.py3-none-any.whl#sha256=425e79b20939abbffa7633a91151a882aedc77564d9313e3584eb0416c28c558 (from https://pypi.org/simple/pip/) (requires-python:>=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*), version: 20.3.1
  Found link https://files.pythonhosted.org/packages/cb/5f/ae1eb8bda1cde4952bd12e468ab8a254c345a0189402bf1421457577f4f3/pip-20.3.1.tar.gz#sha256=43f7d3811f05db95809d39515a5111dd05994965d870178a4fe10d5482f9d2e2 (from https://pypi.org/simple/pip/) (requires-python:>=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*), version: 20.3.1
  Skipping link: yanked for reason: <none given>: https://files.pythonhosted.org/packages/3d/0c/01014c0442830eb38d6baef0932fdcb389279ce74295350ecb9fe09e048a/pip-20.3.2-py2.py3-none-any.whl#sha256=8d779b6a85770bc5f624b5c8d4d922ea2e3cd9ce6ee92aa260f12a9f072477bc (from https://pypi.org/simple/pip/) (requires-python:>=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*)
  Skipping link: yanked for reason: <none given>: https://files.pythonhosted.org/packages/51/63/86e147c44335b03055e58a27c791d94fff4baaf08d67852f925ab9b90240/pip-20.3.2.tar.gz#sha256=aa1516c1c8f6f634919cbd8a58fc81432b0fa96f421a97d05a205ee86b07c43d (from https://pypi.org/simple/pip/) (requires-python:>=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*)
  Found link https://files.pythonhosted.org/packages/54/eb/4a3642e971f404d69d4f6fa3885559d67562801b99d7592487f1ecc4e017/pip-20.3.3-py2.py3-none-any.whl#sha256=fab098c8a1758295dd9f57413c199f23571e8fde6cc39c22c78c961b4ac6286d (from https://pypi.org/simple/pip/) (requires-python:>=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*), version: 20.3.3
  Found link https://files.pythonhosted.org/packages/ca/1e/d91d7aae44d00cd5001957a1473e4e4b7d1d0f072d1af7c34b5899c9ccdf/pip-20.3.3.tar.gz#sha256=79c1ac8a9dccbec8752761cb5a2df833224263ca661477a2a9ed03ddf4e0e3ba (from https://pypi.org/simple/pip/) (requires-python:>=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*), version: 20.3.3
  Found link https://files.pythonhosted.org/packages/27/79/8a850fe3496446ff0d584327ae44e7500daf6764ca1a382d2d02789accf7/pip-20.3.4-py2.py3-none-any.whl#sha256=217ae5161a0e08c0fb873858806e3478c9775caffce5168b50ec885e358c199d (from https://pypi.org/simple/pip/) (requires-python:>=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*), version: 20.3.4
  Found link https://files.pythonhosted.org/packages/53/7f/55721ad0501a9076dbc354cc8c63ffc2d6f1ef360f49ad0fbcce19d68538/pip-20.3.4.tar.gz#sha256=6773934e5f5fc3eaa8c5a44949b5b924fc122daa0a8aa9f80c835b4ca2a543fc (from https://pypi.org/simple/pip/) (requires-python:>=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*), version: 20.3.4
  Found link https://files.pythonhosted.org/packages/de/47/58b9f3e6f611dfd17fb8bd9ed3e6f93b7ee662fb85bdfee3565e8979ddf7/pip-21.0-py3-none-any.whl#sha256=cf2410eedf8735fd842e0fecd4117ca79025d7fe7c161e32f8640ed6ebe5ecb9 (from https://pypi.org/simple/pip/) (requires-python:>=3.6), version: 21.0
  Found link https://files.pythonhosted.org/packages/9e/24/bc928987f35dd0167f21b13a1777c21b9c5917c9894cff93f1c1a6cb8f3b/pip-21.0.tar.gz#sha256=b330cf6467afd5d15f4c1c56f5c95e56a2bfb941c869bed4c1aa517bcb16de25 (from https://pypi.org/simple/pip/) (requires-python:>=3.6), version: 21.0
  Found link https://files.pythonhosted.org/packages/fe/ef/60d7ba03b5c442309ef42e7d69959f73aacccd0d86008362a681c4698e83/pip-21.0.1-py3-none-any.whl#sha256=37fd50e056e2aed635dec96594606f0286640489b0db0ce7607f7e51890372d5 (from https://pypi.org/simple/pip/) (requires-python:>=3.6), version: 21.0.1
  Found link https://files.pythonhosted.org/packages/b7/2d/ad02de84a4c9fd3b1958dc9fb72764de1aa2605a9d7e943837be6ad82337/pip-21.0.1.tar.gz#sha256=99bbde183ec5ec037318e774b0d8ae0a64352fe53b2c7fd630be1d07e94f41e5 (from https://pypi.org/simple/pip/) (requires-python:>=3.6), version: 21.0.1
Given no hashes to check 161 links for project 'pip': discarding no candidates
Removed build tracker: '/private/tmp/pip-req-tracker-1fqlr2pv'

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: command not found https://github.com/jeffreywildman/homebrew-virt-manager/issues/169
bump virt-manager/view-viewer and deps https://github.com/jeffreywildman/homebrew-virt-manager/pull/166
Error installing virt-manager https://github.com/jeffreywildman/homebrew-virt-manager/issues/145
osx virt-manager console screen is black https://github.com/jeffreywildman/homebrew-virt-manager/issues/113
virt-manager crashing with Python quit unexpectedly while using the libgdk-3.0.dylib https://github.com/jeffreywildman/homebrew-virt-manager/issues/62

Before reinstalling the Python Module gi was not found. Looks like it is part of python3-gobject.

Ideas for that?

Best Regards

INHack20 commented 3 years ago

+1

/usr/local/Cellar/virt-manager/2.2.13/libexec/bin/pip install -v --no-deps --no-binary :all: --ignore-installed /private/tmp/virt-manager--libvirt-python-20210329-23269-173p2mf/libvirt-python-6.10.0 Last 15 lines from /Users/inhack20/Library/Logs/Homebrew/virt-manager/02.pip: Found link https://files.pythonhosted.org/packages/03/41/6da553f689d530bc2c337d2c496a40dc9c0fdc6481e5df1f3ee3b8574479/pip-20.3.tar.gz#sha256=9ae7ca6656eac22d2a9b49d024fc24e00f68f4c4d4db673d2d9b525c3dea6e0e (from https://pypi.org/simple/pip/) (requires-python:>=2.7,!=3.0.,!=3.1.,!=3.2.,!=3.3.,!=3.4.), version: 20.3 Found link https://files.pythonhosted.org/packages/ab/11/2dc62c5263d9eb322f2f028f7b56cd9d096bb8988fcf82d65fa2e4057afe/pip-20.3.1-py2.py3-none-any.whl#sha256=425e79b20939abbffa7633a91151a882aedc77564d9313e3584eb0416c28c558 (from https://pypi.org/simple/pip/) (requires-python:>=2.7,!=3.0.,!=3.1.,!=3.2.,!=3.3.,!=3.4.), version: 20.3.1 Found link https://files.pythonhosted.org/packages/cb/5f/ae1eb8bda1cde4952bd12e468ab8a254c345a0189402bf1421457577f4f3/pip-20.3.1.tar.gz#sha256=43f7d3811f05db95809d39515a5111dd05994965d870178a4fe10d5482f9d2e2 (from https://pypi.org/simple/pip/) (requires-python:>=2.7,!=3.0.,!=3.1.,!=3.2.,!=3.3.,!=3.4.), version: 20.3.1 Skipping link: yanked for reason: : https://files.pythonhosted.org/packages/3d/0c/01014c0442830eb38d6baef0932fdcb389279ce74295350ecb9fe09e048a/pip-20.3.2-py2.py3-none-any.whl#sha256=8d779b6a85770bc5f624b5c8d4d922ea2e3cd9ce6ee92aa260f12a9f072477bc (from https://pypi.org/simple/pip/) (requires-python:>=2.7,!=3.0.,!=3.1.,!=3.2.,!=3.3.,!=3.4.) Skipping link: yanked for reason: : https://files.pythonhosted.org/packages/51/63/86e147c44335b03055e58a27c791d94fff4baaf08d67852f925ab9b90240/pip-20.3.2.tar.gz#sha256=aa1516c1c8f6f634919cbd8a58fc81432b0fa96f421a97d05a205ee86b07c43d (from https://pypi.org/simple/pip/) (requires-python:>=2.7,!=3.0.,!=3.1.,!=3.2.,!=3.3.,!=3.4.) Found link https://files.pythonhosted.org/packages/54/eb/4a3642e971f404d69d4f6fa3885559d67562801b99d7592487f1ecc4e017/pip-20.3.3-py2.py3-none-any.whl#sha256=fab098c8a1758295dd9f57413c199f23571e8fde6cc39c22c78c961b4ac6286d (from https://pypi.org/simple/pip/) (requires-python:>=2.7,!=3.0.,!=3.1.,!=3.2.,!=3.3.,!=3.4.), version: 20.3.3 Found link https://files.pythonhosted.org/packages/ca/1e/d91d7aae44d00cd5001957a1473e4e4b7d1d0f072d1af7c34b5899c9ccdf/pip-20.3.3.tar.gz#sha256=79c1ac8a9dccbec8752761cb5a2df833224263ca661477a2a9ed03ddf4e0e3ba (from https://pypi.org/simple/pip/) (requires-python:>=2.7,!=3.0.,!=3.1.,!=3.2.,!=3.3.,!=3.4.), version: 20.3.3 Found link https://files.pythonhosted.org/packages/27/79/8a850fe3496446ff0d584327ae44e7500daf6764ca1a382d2d02789accf7/pip-20.3.4-py2.py3-none-any.whl#sha256=217ae5161a0e08c0fb873858806e3478c9775caffce5168b50ec885e358c199d (from https://pypi.org/simple/pip/) (requires-python:>=2.7,!=3.0.,!=3.1.,!=3.2.,!=3.3.,!=3.4.), version: 20.3.4 Found link https://files.pythonhosted.org/packages/53/7f/55721ad0501a9076dbc354cc8c63ffc2d6f1ef360f49ad0fbcce19d68538/pip-20.3.4.tar.gz#sha256=6773934e5f5fc3eaa8c5a44949b5b924fc122daa0a8aa9f80c835b4ca2a543fc (from https://pypi.org/simple/pip/) (requires-python:>=2.7,!=3.0.,!=3.1.,!=3.2.,!=3.3.,!=3.4.*), version: 20.3.4 Found link https://files.pythonhosted.org/packages/de/47/58b9f3e6f611dfd17fb8bd9ed3e6f93b7ee662fb85bdfee3565e8979ddf7/pip-21.0-py3-none-any.whl#sha256=cf2410eedf8735fd842e0fecd4117ca79025d7fe7c161e32f8640ed6ebe5ecb9 (from https://pypi.org/simple/pip/) (requires-python:>=3.6), version: 21.0 Found link https://files.pythonhosted.org/packages/9e/24/bc928987f35dd0167f21b13a1777c21b9c5917c9894cff93f1c1a6cb8f3b/pip-21.0.tar.gz#sha256=b330cf6467afd5d15f4c1c56f5c95e56a2bfb941c869bed4c1aa517bcb16de25 (from https://pypi.org/simple/pip/) (requires-python:>=3.6), version: 21.0 Found link https://files.pythonhosted.org/packages/fe/ef/60d7ba03b5c442309ef42e7d69959f73aacccd0d86008362a681c4698e83/pip-21.0.1-py3-none-any.whl#sha256=37fd50e056e2aed635dec96594606f0286640489b0db0ce7607f7e51890372d5 (from https://pypi.org/simple/pip/) (requires-python:>=3.6), version: 21.0.1 Found link https://files.pythonhosted.org/packages/b7/2d/ad02de84a4c9fd3b1958dc9fb72764de1aa2605a9d7e943837be6ad82337/pip-21.0.1.tar.gz#sha256=99bbde183ec5ec037318e774b0d8ae0a64352fe53b2c7fd630be1d07e94f41e5 (from https://pypi.org/simple/pip/) (requires-python:>=3.6), version: 21.0.1 Given no hashes to check 161 links for project 'pip': discarding no candidates Removed build tracker: '/private/tmp/pip-req-tracker-e8go1gp'

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: command not found https://github.com/jeffreywildman/homebrew-virt-manager/issues/169 virt-manager broken on Big Sur after minor update https://github.com/jeffreywildman/homebrew-virt-manager/issues/170 bump virt-manager/view-viewer and deps https://github.com/jeffreywildman/homebrew-virt-manager/pull/166 Error installing virt-manager https://github.com/jeffreywildman/homebrew-virt-manager/issues/145 osx virt-manager console screen is black https://github.com/jeffreywildman/homebrew-virt-manager/issues/113 virt-manager crashing with Python quit unexpectedly while using the libgdk-3.0.dylib https://github.com/jeffreywildman/homebrew-virt-manager/issues/62

nnatoli commented 3 years ago

+1 same output

/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--libvirt-python-20210330-7478-qgjxwj/libvirt-python-6.10.0 Last 15 lines from /Users/nicolasnatoli/Library/Logs/Homebrew/virt-manager/02.pip: Found link https://files.pythonhosted.org/packages/03/41/6da553f689d530bc2c337d2c496a40dc9c0fdc6481e5df1f3ee3b8574479/pip-20.3.tar.gz#sha256=9ae7ca6656eac22d2a9b49d024fc24e00f68f4c4d4db673d2d9b525c3dea6e0e (from https://pypi.org/simple/pip/) (requires-python:>=2.7,!=3.0.,!=3.1.,!=3.2.,!=3.3.,!=3.4.), version: 20.3 Found link https://files.pythonhosted.org/packages/ab/11/2dc62c5263d9eb322f2f028f7b56cd9d096bb8988fcf82d65fa2e4057afe/pip-20.3.1-py2.py3-none-any.whl#sha256=425e79b20939abbffa7633a91151a882aedc77564d9313e3584eb0416c28c558 (from https://pypi.org/simple/pip/) (requires-python:>=2.7,!=3.0.,!=3.1.,!=3.2.,!=3.3.,!=3.4.), version: 20.3.1 Found link https://files.pythonhosted.org/packages/cb/5f/ae1eb8bda1cde4952bd12e468ab8a254c345a0189402bf1421457577f4f3/pip-20.3.1.tar.gz#sha256=43f7d3811f05db95809d39515a5111dd05994965d870178a4fe10d5482f9d2e2 (from https://pypi.org/simple/pip/) (requires-python:>=2.7,!=3.0.,!=3.1.,!=3.2.,!=3.3.,!=3.4.), version: 20.3.1 Skipping link: yanked for reason: : https://files.pythonhosted.org/packages/3d/0c/01014c0442830eb38d6baef0932fdcb389279ce74295350ecb9fe09e048a/pip-20.3.2-py2.py3-none-any.whl#sha256=8d779b6a85770bc5f624b5c8d4d922ea2e3cd9ce6ee92aa260f12a9f072477bc (from https://pypi.org/simple/pip/) (requires-python:>=2.7,!=3.0.,!=3.1.,!=3.2.,!=3.3.,!=3.4.) Skipping link: yanked for reason: : https://files.pythonhosted.org/packages/51/63/86e147c44335b03055e58a27c791d94fff4baaf08d67852f925ab9b90240/pip-20.3.2.tar.gz#sha256=aa1516c1c8f6f634919cbd8a58fc81432b0fa96f421a97d05a205ee86b07c43d (from https://pypi.org/simple/pip/) (requires-python:>=2.7,!=3.0.,!=3.1.,!=3.2.,!=3.3.,!=3.4.) Found link https://files.pythonhosted.org/packages/54/eb/4a3642e971f404d69d4f6fa3885559d67562801b99d7592487f1ecc4e017/pip-20.3.3-py2.py3-none-any.whl#sha256=fab098c8a1758295dd9f57413c199f23571e8fde6cc39c22c78c961b4ac6286d (from https://pypi.org/simple/pip/) (requires-python:>=2.7,!=3.0.,!=3.1.,!=3.2.,!=3.3.,!=3.4.), version: 20.3.3 Found link https://files.pythonhosted.org/packages/ca/1e/d91d7aae44d00cd5001957a1473e4e4b7d1d0f072d1af7c34b5899c9ccdf/pip-20.3.3.tar.gz#sha256=79c1ac8a9dccbec8752761cb5a2df833224263ca661477a2a9ed03ddf4e0e3ba (from https://pypi.org/simple/pip/) (requires-python:>=2.7,!=3.0.,!=3.1.,!=3.2.,!=3.3.,!=3.4.), version: 20.3.3 Found link https://files.pythonhosted.org/packages/27/79/8a850fe3496446ff0d584327ae44e7500daf6764ca1a382d2d02789accf7/pip-20.3.4-py2.py3-none-any.whl#sha256=217ae5161a0e08c0fb873858806e3478c9775caffce5168b50ec885e358c199d (from https://pypi.org/simple/pip/) (requires-python:>=2.7,!=3.0.,!=3.1.,!=3.2.,!=3.3.,!=3.4.), version: 20.3.4 Found link https://files.pythonhosted.org/packages/53/7f/55721ad0501a9076dbc354cc8c63ffc2d6f1ef360f49ad0fbcce19d68538/pip-20.3.4.tar.gz#sha256=6773934e5f5fc3eaa8c5a44949b5b924fc122daa0a8aa9f80c835b4ca2a543fc (from https://pypi.org/simple/pip/) (requires-python:>=2.7,!=3.0.,!=3.1.,!=3.2.,!=3.3.,!=3.4.*), version: 20.3.4 Found link https://files.pythonhosted.org/packages/de/47/58b9f3e6f611dfd17fb8bd9ed3e6f93b7ee662fb85bdfee3565e8979ddf7/pip-21.0-py3-none-any.whl#sha256=cf2410eedf8735fd842e0fecd4117ca79025d7fe7c161e32f8640ed6ebe5ecb9 (from https://pypi.org/simple/pip/) (requires-python:>=3.6), version: 21.0 Found link https://files.pythonhosted.org/packages/9e/24/bc928987f35dd0167f21b13a1777c21b9c5917c9894cff93f1c1a6cb8f3b/pip-21.0.tar.gz#sha256=b330cf6467afd5d15f4c1c56f5c95e56a2bfb941c869bed4c1aa517bcb16de25 (from https://pypi.org/simple/pip/) (requires-python:>=3.6), version: 21.0 Found link https://files.pythonhosted.org/packages/fe/ef/60d7ba03b5c442309ef42e7d69959f73aacccd0d86008362a681c4698e83/pip-21.0.1-py3-none-any.whl#sha256=37fd50e056e2aed635dec96594606f0286640489b0db0ce7607f7e51890372d5 (from https://pypi.org/simple/pip/) (requires-python:>=3.6), version: 21.0.1 Found link https://files.pythonhosted.org/packages/b7/2d/ad02de84a4c9fd3b1958dc9fb72764de1aa2605a9d7e943837be6ad82337/pip-21.0.1.tar.gz#sha256=99bbde183ec5ec037318e774b0d8ae0a64352fe53b2c7fd630be1d07e94f41e5 (from https://pypi.org/simple/pip/) (requires-python:>=3.6), version: 21.0.1 Given no hashes to check 161 links for project 'pip': discarding no candidates Removed build tracker: '/private/tmp/pip-req-tracker-g41zc1py'

clebersantz commented 3 years ago

Same here on Big sur..even with a clean Big Sur, Python3 and Homebrew install the problem persists.

I Try first install pip install certifi chardet idna pycairo requests urllib3 libvirt-python, but the problem continue. Even installing python modules separated virt-manager try install it again and fails.

inspirit1986 commented 3 years ago

same problem on big sur

terryding77 commented 3 years ago

same problem on big sur, first install on mac

J-Siu commented 3 years ago

Not familiar with python, but looking at the print out and python version installed, seems part of the package require python >2.7 and < 3.x:

  Found link https://files.pythonhosted.org/packages/03/41/6da553f689d530bc2c337d2c496a40dc9c0fdc6481e5df1f3ee3b8574479/pip-20.3.tar.gz#sha256=9ae7ca6656eac22d2a9b49d024fc24e00f68f4c4d4db673d2d9b525c3dea6e0e (from https://pypi.org/simple/pip/) (requires-python:>=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*), version: 20.3
  Found link https://files.pythonhosted.org/packages/ab/11/2dc62c5263d9eb322f2f028f7b56cd9d096bb8988fcf82d65fa2e4057afe/pip-20.3.1-py2.py3-none-any.whl#sha256=425e79b20939abbffa7633a91151a882aedc77564d9313e3584eb0416c28c558 (from https://pypi.org/simple/pip/) (requires-python:>=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*), version: 20.3.1
  Found link https://files.pythonhosted.org/packages/cb/5f/ae1eb8bda1cde4952bd12e468ab8a254c345a0189402bf1421457577f4f3/pip-20.3.1.tar.gz#sha256=43f7d3811f05db95809d39515a5111dd05994965d870178a4fe10d5482f9d2e2 (from https://pypi.org/simple/pip/) (requires-python:>=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*), version: 20.3.1
  Skipping link: yanked for reason: <none given>: https://files.pythonhosted.org/packages/3d/0c/01014c0442830eb38d6baef0932fdcb389279ce74295350ecb9fe09e048a/pip-20.3.2-py2.py3-none-any.whl#sha256=8d779b6a85770bc5f624b5c8d4d922ea2e3cd9ce6ee92aa260f12a9f072477bc (from https://pypi.org/simple/pip/) (requires-python:>=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*)
  Skipping link: yanked for reason: <none given>: https://files.pythonhosted.org/packages/51/63/86e147c44335b03055e58a27c791d94fff4baaf08d67852f925ab9b90240/pip-20.3.2.tar.gz#sha256=aa1516c1c8f6f634919cbd8a58fc81432b0fa96f421a97d05a205ee86b07c43d (from https://pypi.org/simple/pip/) (requires-python:>=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*)
  Found link https://files.pythonhosted.org/packages/54/eb/4a3642e971f404d69d4f6fa3885559d67562801b99d7592487f1ecc4e017/pip-20.3.3-py2.py3-none-any.whl#sha256=fab098c8a1758295dd9f57413c199f23571e8fde6cc39c22c78c961b4ac6286d (from https://pypi.org/simple/pip/) (requires-python:>=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*), version: 20.3.3
  Found link https://files.pythonhosted.org/packages/ca/1e/d91d7aae44d00cd5001957a1473e4e4b7d1d0f072d1af7c34b5899c9ccdf/pip-20.3.3.tar.gz#sha256=79c1ac8a9dccbec8752761cb5a2df833224263ca661477a2a9ed03ddf4e0e3ba (from https://pypi.org/simple/pip/) (requires-python:>=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*), version: 20.3.3
  Found link https://files.pythonhosted.org/packages/27/79/8a850fe3496446ff0d584327ae44e7500daf6764ca1a382d2d02789accf7/pip-20.3.4-py2.py3-none-any.whl#sha256=217ae5161a0e08c0fb873858806e3478c9775caffce5168b50ec885e358c199d (from https://pypi.org/simple/pip/) (requires-python:>=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*), version: 20.3.4
  Found link https://files.pythonhosted.org/packages/53/7f/55721ad0501a9076dbc354cc8c63ffc2d6f1ef360f49ad0fbcce19d68538/pip-20.3.4.tar.gz#sha256=6773934e5f5fc3eaa8c5a44949b5b924fc122daa0a8aa9f80c835b4ca2a543fc (from https://pypi.org/simple/pip/) (requires-python:>=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*), version: 20.3.4

While some part require python > 3.6:

  Found link https://files.pythonhosted.org/packages/de/47/58b9f3e6f611dfd17fb8bd9ed3e6f93b7ee662fb85bdfee3565e8979ddf7/pip-21.0-py3-none-any.whl#sha256=cf2410eedf8735fd842e0fecd4117ca79025d7fe7c161e32f8640ed6ebe5ecb9 (from https://pypi.org/simple/pip/) (requires-python:>=3.6), version: 21.0
  Found link https://files.pythonhosted.org/packages/9e/24/bc928987f35dd0167f21b13a1777c21b9c5917c9894cff93f1c1a6cb8f3b/pip-21.0.tar.gz#sha256=b330cf6467afd5d15f4c1c56f5c95e56a2bfb941c869bed4c1aa517bcb16de25 (from https://pypi.org/simple/pip/) (requires-python:>=3.6), version: 21.0
  Found link https://files.pythonhosted.org/packages/fe/ef/60d7ba03b5c442309ef42e7d69959f73aacccd0d86008362a681c4698e83/pip-21.0.1-py3-none-any.whl#sha256=37fd50e056e2aed635dec96594606f0286640489b0db0ce7607f7e51890372d5 (from https://pypi.org/simple/pip/) (requires-python:>=3.6), version: 21.0.1
  Found link https://files.pythonhosted.org/packages/b7/2d/ad02de84a4c9fd3b1958dc9fb72764de1aa2605a9d7e943837be6ad82337/pip-21.0.1.tar.gz#sha256=99bbde183ec5ec037318e774b0d8ae0a64352fe53b2c7fd630be1d07e94f41e5 (from https://pypi.org/simple/pip/) (requires-python:>=3.6), version: 21.0.1

However currently brew only carry python 3.7, 3.8 and 3.9.

Moreover, even previously working virt-manager stop working with following error:

$ virt-manager
Traceback (most recent call last):
  File "/usr/local/Cellar/virt-manager/2.2.1_3/libexec/share/virt-manager/virt-manager", line 15, in <module>
    import gi
ModuleNotFoundError: No module named 'gi'

Maybe the source need to be updated to virt-manager 3.2?

mahdiarfrm commented 3 years ago

same here. please update.

boiUneedAwash commented 3 years ago

==> python3 -m venv /usr/local/Cellar/virt-manager/2.2.1_3/libexec ==> /usr/local/Cellar/virt-manager/2.2.1_3/libexec/bin/pip install -v --no-deps Last 15 lines from /Users/jamestiller/Library/Logs/Homebrew/virt-manager/02.pip: Found link https://files.pythonhosted.org/packages/03/41/6da553f689d530bc2c337d2c496a40dc9c0fdc6481e5df1f3ee3b8574479/pip-20.3.tar.gz#sha256=9ae7ca6656eac22d2a9b49d024fc24e00f68f4c4d4db673d2d9b525c3dea6e0e (from https://pypi.org/simple/pip/) (requires-python:>=2.7,!=3.0.,!=3.1.,!=3.2.,!=3.3.,!=3.4.), version: 20.3 Found link https://files.pythonhosted.org/packages/ab/11/2dc62c5263d9eb322f2f028f7b56cd9d096bb8988fcf82d65fa2e4057afe/pip-20.3.1-py2.py3-none-any.whl#sha256=425e79b20939abbffa7633a91151a882aedc77564d9313e3584eb0416c28c558 (from https://pypi.org/simple/pip/) (requires-python:>=2.7,!=3.0.,!=3.1.,!=3.2.,!=3.3.,!=3.4.), version: 20.3.1 Found link https://files.pythonhosted.org/packages/cb/5f/ae1eb8bda1cde4952bd12e468ab8a254c345a0189402bf1421457577f4f3/pip-20.3.1.tar.gz#sha256=43f7d3811f05db95809d39515a5111dd05994965d870178a4fe10d5482f9d2e2 (from https://pypi.org/simple/pip/) (requires-python:>=2.7,!=3.0.,!=3.1.,!=3.2.,!=3.3.,!=3.4.), version: 20.3.1 Skipping link: yanked for reason: : https://files.pythonhosted.org/packages/3d/0c/01014c0442830eb38d6baef0932fdcb389279ce74295350ecb9fe09e048a/pip-20.3.2-py2.py3-none-any.whl#sha256=8d779b6a85770bc5f624b5c8d4d922ea2e3cd9ce6ee92aa260f12a9f072477bc (from https://pypi.org/simple/pip/) (requires-python:>=2.7,!=3.0.,!=3.1.,!=3.2.,!=3.3.,!=3.4.) Skipping link: yanked for reason: : https://files.pythonhosted.org/packages/51/63/86e147c44335b03055e58a27c791d94fff4baaf08d67852f925ab9b90240/pip-20.3.2.tar.gz#sha256=aa1516c1c8f6f634919cbd8a58fc81432b0fa96f421a97d05a205ee86b07c43d (from https://pypi.org/simple/pip/) (requires-python:>=2.7,!=3.0.,!=3.1.,!=3.2.,!=3.3.,!=3.4.) Found link https://files.pythonhosted.org/packages/54/eb/4a3642e971f404d69d4f6fa3885559d67562801b99d7592487f1ecc4e017/pip-20.3.3-py2.py3-none-any.whl#sha256=fab098c8a1758295dd9f57413c199f23571e8fde6cc39c22c78c961b4ac6286d (from https://pypi.org/simple/pip/) (requires-python:>=2.7,!=3.0.,!=3.1.,!=3.2.,!=3.3.,!=3.4.), version: 20.3.3 Found link https://files.pythonhosted.org/packages/ca/1e/d91d7aae44d00cd5001957a1473e4e4b7d1d0f072d1af7c34b5899c9ccdf/pip-20.3.3.tar.gz#sha256=79c1ac8a9dccbec8752761cb5a2df833224263ca661477a2a9ed03ddf4e0e3ba (from https://pypi.org/simple/pip/) (requires-python:>=2.7,!=3.0.,!=3.1.,!=3.2.,!=3.3.,!=3.4.), version: 20.3.3 Found link https://files.pythonhosted.org/packages/27/79/8a850fe3496446ff0d584327ae44e7500daf6764ca1a382d2d02789accf7/pip-20.3.4-py2.py3-none-any.whl#sha256=217ae5161a0e08c0fb873858806e3478c9775caffce5168b50ec885e358c199d (from https://pypi.org/simple/pip/) (requires-python:>=2.7,!=3.0.,!=3.1.,!=3.2.,!=3.3.,!=3.4.), version: 20.3.4 Found link https://files.pythonhosted.org/packages/53/7f/55721ad0501a9076dbc354cc8c63ffc2d6f1ef360f49ad0fbcce19d68538/pip-20.3.4.tar.gz#sha256=6773934e5f5fc3eaa8c5a44949b5b924fc122daa0a8aa9f80c835b4ca2a543fc (from https://pypi.org/simple/pip/) (requires-python:>=2.7,!=3.0.,!=3.1.,!=3.2.,!=3.3.,!=3.4.*), version: 20.3.4 Found link https://files.pythonhosted.org/packages/de/47/58b9f3e6f611dfd17fb8bd9ed3e6f93b7ee662fb85bdfee3565e8979ddf7/pip-21.0-py3-none-any.whl#sha256=cf2410eedf8735fd842e0fecd4117ca79025d7fe7c161e32f8640ed6ebe5ecb9 (from https://pypi.org/simple/pip/) (requires-python:>=3.6), version: 21.0 Found link https://files.pythonhosted.org/packages/9e/24/bc928987f35dd0167f21b13a1777c21b9c5917c9894cff93f1c1a6cb8f3b/pip-21.0.tar.gz#sha256=b330cf6467afd5d15f4c1c56f5c95e56a2bfb941c869bed4c1aa517bcb16de25 (from https://pypi.org/simple/pip/) (requires-python:>=3.6), version: 21.0 Found link https://files.pythonhosted.org/packages/fe/ef/60d7ba03b5c442309ef42e7d69959f73aacccd0d86008362a681c4698e83/pip-21.0.1-py3-none-any.whl#sha256=37fd50e056e2aed635dec96594606f0286640489b0db0ce7607f7e51890372d5 (from https://pypi.org/simple/pip/) (requires-python:>=3.6), version: 21.0.1 Found link https://files.pythonhosted.org/packages/b7/2d/ad02de84a4c9fd3b1958dc9fb72764de1aa2605a9d7e943837be6ad82337/pip-21.0.1.tar.gz#sha256=99bbde183ec5ec037318e774b0d8ae0a64352fe53b2c7fd630be1d07e94f41e5 (from https://pypi.org/simple/pip/) (requires-python:>=3.6), version: 21.0.1 Given no hashes to check 161 links for project 'pip': discarding no candidates Removed build tracker: '/private/tmp/pip-req-tracker-5j00xbj7'

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: command not found https://github.com/jeffreywildman/homebrew-virt-manager/issues/169 virt-manager broken on Big Sur after minor update https://github.com/jeffreywildman/homebrew-virt-manager/issues/170 bump virt-manager/view-viewer and deps https://github.com/jeffreywildman/homebrew-virt-manager/pull/166 Error installing virt-manager https://github.com/jeffreywildman/homebrew-virt-manager/issues/145 osx virt-manager console screen is black https://github.com/jeffreywildman/homebrew-virt-manager/issues/113 virt-manager crashing with Python quit unexpectedly while using the libgdk-3.0.dylib https://github.com/jeffreywildman/homebrew-virt-manager/issues/62 jamestiller@Jamess-iMac ~ % virt-manager -c test:///default zsh: command not found: virt-manager

+1

olatignies commented 3 years ago

Same on Catalina 10.15.7

==> python3 -m venv /usr/local/Cellar/virt-manager/2.2.1_3/libexec ==> /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--libvirt-p Last 15 lines from /Users/olatignies/Library/Logs/Homebrew/virt-manager/02.pip: Found link https://files.pythonhosted.org/packages/03/41/6da553f689d530bc2c337d2c496a40dc9c0fdc6481e5df1f3ee3b8574479/pip-20.3.tar.gz#sha256=9ae7ca6656eac22d2a9b49d024fc24e00f68f4c4d4db673d2d9b525c3dea6e0e (from https://pypi.org/simple/pip/) (requires-python:>=2.7,!=3.0.,!=3.1.,!=3.2.,!=3.3.,!=3.4.), version: 20.3 Found link https://files.pythonhosted.org/packages/ab/11/2dc62c5263d9eb322f2f028f7b56cd9d096bb8988fcf82d65fa2e4057afe/pip-20.3.1-py2.py3-none-any.whl#sha256=425e79b20939abbffa7633a91151a882aedc77564d9313e3584eb0416c28c558 (from https://pypi.org/simple/pip/) (requires-python:>=2.7,!=3.0.,!=3.1.,!=3.2.,!=3.3.,!=3.4.), version: 20.3.1 Found link https://files.pythonhosted.org/packages/cb/5f/ae1eb8bda1cde4952bd12e468ab8a254c345a0189402bf1421457577f4f3/pip-20.3.1.tar.gz#sha256=43f7d3811f05db95809d39515a5111dd05994965d870178a4fe10d5482f9d2e2 (from https://pypi.org/simple/pip/) (requires-python:>=2.7,!=3.0.,!=3.1.,!=3.2.,!=3.3.,!=3.4.), version: 20.3.1 Skipping link: yanked for reason: : https://files.pythonhosted.org/packages/3d/0c/01014c0442830eb38d6baef0932fdcb389279ce74295350ecb9fe09e048a/pip-20.3.2-py2.py3-none-any.whl#sha256=8d779b6a85770bc5f624b5c8d4d922ea2e3cd9ce6ee92aa260f12a9f072477bc (from https://pypi.org/simple/pip/) (requires-python:>=2.7,!=3.0.,!=3.1.,!=3.2.,!=3.3.,!=3.4.) Skipping link: yanked for reason: : https://files.pythonhosted.org/packages/51/63/86e147c44335b03055e58a27c791d94fff4baaf08d67852f925ab9b90240/pip-20.3.2.tar.gz#sha256=aa1516c1c8f6f634919cbd8a58fc81432b0fa96f421a97d05a205ee86b07c43d (from https://pypi.org/simple/pip/) (requires-python:>=2.7,!=3.0.,!=3.1.,!=3.2.,!=3.3.,!=3.4.) Found link https://files.pythonhosted.org/packages/54/eb/4a3642e971f404d69d4f6fa3885559d67562801b99d7592487f1ecc4e017/pip-20.3.3-py2.py3-none-any.whl#sha256=fab098c8a1758295dd9f57413c199f23571e8fde6cc39c22c78c961b4ac6286d (from https://pypi.org/simple/pip/) (requires-python:>=2.7,!=3.0.,!=3.1.,!=3.2.,!=3.3.,!=3.4.), version: 20.3.3 Found link https://files.pythonhosted.org/packages/ca/1e/d91d7aae44d00cd5001957a1473e4e4b7d1d0f072d1af7c34b5899c9ccdf/pip-20.3.3.tar.gz#sha256=79c1ac8a9dccbec8752761cb5a2df833224263ca661477a2a9ed03ddf4e0e3ba (from https://pypi.org/simple/pip/) (requires-python:>=2.7,!=3.0.,!=3.1.,!=3.2.,!=3.3.,!=3.4.), version: 20.3.3 Found link https://files.pythonhosted.org/packages/27/79/8a850fe3496446ff0d584327ae44e7500daf6764ca1a382d2d02789accf7/pip-20.3.4-py2.py3-none-any.whl#sha256=217ae5161a0e08c0fb873858806e3478c9775caffce5168b50ec885e358c199d (from https://pypi.org/simple/pip/) (requires-python:>=2.7,!=3.0.,!=3.1.,!=3.2.,!=3.3.,!=3.4.), version: 20.3.4 Found link https://files.pythonhosted.org/packages/53/7f/55721ad0501a9076dbc354cc8c63ffc2d6f1ef360f49ad0fbcce19d68538/pip-20.3.4.tar.gz#sha256=6773934e5f5fc3eaa8c5a44949b5b924fc122daa0a8aa9f80c835b4ca2a543fc (from https://pypi.org/simple/pip/) (requires-python:>=2.7,!=3.0.,!=3.1.,!=3.2.,!=3.3.,!=3.4.*), version: 20.3.4 Found link https://files.pythonhosted.org/packages/de/47/58b9f3e6f611dfd17fb8bd9ed3e6f93b7ee662fb85bdfee3565e8979ddf7/pip-21.0-py3-none-any.whl#sha256=cf2410eedf8735fd842e0fecd4117ca79025d7fe7c161e32f8640ed6ebe5ecb9 (from https://pypi.org/simple/pip/) (requires-python:>=3.6), version: 21.0 Found link https://files.pythonhosted.org/packages/9e/24/bc928987f35dd0167f21b13a1777c21b9c5917c9894cff93f1c1a6cb8f3b/pip-21.0.tar.gz#sha256=b330cf6467afd5d15f4c1c56f5c95e56a2bfb941c869bed4c1aa517bcb16de25 (from https://pypi.org/simple/pip/) (requires-python:>=3.6), version: 21.0 Found link https://files.pythonhosted.org/packages/fe/ef/60d7ba03b5c442309ef42e7d69959f73aacccd0d86008362a681c4698e83/pip-21.0.1-py3-none-any.whl#sha256=37fd50e056e2aed635dec96594606f0286640489b0db0ce7607f7e51890372d5 (from https://pypi.org/simple/pip/) (requires-python:>=3.6), version: 21.0.1 Found link https://files.pythonhosted.org/packages/b7/2d/ad02de84a4c9fd3b1958dc9fb72764de1aa2605a9d7e943837be6ad82337/pip-21.0.1.tar.gz#sha256=99bbde183ec5ec037318e774b0d8ae0a64352fe53b2c7fd630be1d07e94f41e5 (from https://pypi.org/simple/pip/) (requires-python:>=3.6), version: 21.0.1 Given no hashes to check 161 links for project 'pip': discarding no candidates Removed build tracker: '/private/tmp/pip-req-tracker-5bi4e41y'

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: command not found https://github.com/jeffreywildman/homebrew-virt-manager/issues/169 virt-manager broken on Big Sur after minor update https://github.com/jeffreywildman/homebrew-virt-manager/issues/170 bump virt-manager/view-viewer and deps https://github.com/jeffreywildman/homebrew-virt-manager/pull/166 Error installing virt-manager https://github.com/jeffreywildman/homebrew-virt-manager/issues/145 osx virt-manager console screen is black https://github.com/jeffreywildman/homebrew-virt-manager/issues/113 virt-manager crashing with Python quit unexpectedly while using the libgdk-3.0.dylib https://github.com/jeffreywildman/homebrew-virt-manager/issues/62

pmnxis commented 3 years ago

Me either, on 10.15.7

zhouwjfi commented 3 years ago

I fixed it by updating libvirt-python to 7.2.0 .

J-Siu commented 3 years ago

Only updating libvirt-python to 7.2.0 didn't work for me.

I don't know ruby and don't understand homebrew build system, I just brute force my way through it. 🤦

I end up doing following:

brew uninstall virt-manager
cd /usr/local/bin
# They were not symlink in my box, I have to manually delete them
rm virt-clone virt-intall virt-manager virt-xml

Then brew edit virt-manager and changed following:

Following is my current working formula, use at your own risk:

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 "docutils"
  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"

  resource "libvirt-python" do
    url "https://libvirt.org/sources/python/libvirt-python-7.2.0.tar.gz"
    sha256 "c0c3bac54c55622e17927b09cd9843869600d71842fb072c99491fe2608dcee7"
  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/python3", "setup.py",
                     "configure",
                     "--prefix=#{libexec}"
    system "#{libexec}/bin/python3", "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")
kali-brandwatch commented 3 years ago

Only updating libvirt-python to 7.2.0 didn't work for me.

I don't know ruby and don't understand homebrew build system, I just brute force my way through it. 🤦

I end up doing following:

This solution worked for me! Thank you so much!

inspirit1986 commented 3 years ago

@J-Siu - Thank you! it's working!

PS. If anyone got this error: 11:23:32.138: Failed to load shared library 'libpango-1.0.0.dylib' referenced by the typelib: dlopen(libpango-1.0.0.dylib, 9): image not found : Could not open display: /private/tmp/com.apple.launchd.bUJAojAVPX/org.macosforge.xquartz:0

Check that - pango was installed over brew (brew install pango) then change $DYLD_FALLBACK_LIBRARY_PATH env variable to export DYLD_FALLBACK_LIBRARY_PATH=$DYLD_FALLBACK_LIBRARY_PATH:/usr/local/lib in ~/.zshrc

waltlillyman commented 3 years ago

@J-Siu Thank you, that worked for me!

ljgzts commented 3 years ago

@J-Siu " Comment out the patch line as it doesn't apply for 3.2.0. (I setup ssh key for my target box.)" ,what's mean? I don't how to do ,please help!

ljgzts commented 3 years ago

@waltlillyman last part : " Comment out the patch line as it doesn't apply for 3.2.0. (I setup ssh key for my target box.)" ,what's mean? I don't how to do ,please help me!

J-Siu commented 3 years ago

@ljgzts There is a line patch :DATA in the original file. It patch virt-manager 2.2.1 to allow ssh password. That patch cannot be apply to 3.2.0. So I commented it by adding a # in front.

hansoostendorp commented 3 years ago

Only updating libvirt-python to 7.2.0 didn't work for me.

I don't know ruby and don't understand homebrew build system, I just brute force my way through it. 🤦

I end up doing following:

Thank you @J-Siu! Using your instructions I am able to run virt-manager on mij MacBook Air M1, your solution works. Thanks again!

abdusalamApps commented 3 years ago

Only updating libvirt-python to 7.2.0 didn't work for me.

I don't know ruby and don't understand homebrew build system, I just brute force my way through it. 🤦

I end up doing following:

brew uninstall virt-manager
cd /usr/local/bin
# They were not symlink in my box, I have to manually delete them
rm virt-clone virt-intall virt-manager virt-xml

Then brew edit virt-manager and changed following:

* Update virt-manager source to 3.2.0

* Add `depends_on "docutils"` for rst2man

* Update libvirt-python to 7.2.0 as suggested. (Tried to remove it as brew has the package, but then virt-manager fail to run.)

* Use python3 instead of python in `def install` section.

* Update sha256 when error pop up during brew install

* Comment out the `patch` line as it doesn't apply for 3.2.0. (I setup ssh key for my target box.)

Following is my current working formula, use at your own risk:

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 "docutils"
  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"

  resource "libvirt-python" do
    url "https://libvirt.org/sources/python/libvirt-python-7.2.0.tar.gz"
    sha256 "c0c3bac54c55622e17927b09cd9843869600d71842fb072c99491fe2608dcee7"
  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/python3", "setup.py",
                     "configure",
                     "--prefix=#{libexec}"
    system "#{libexec}/bin/python3", "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")

Worked for me as well. Thank you, good sir.

austinben commented 3 years ago

@J-Siu - Thank you! it's working!

PS. If anyone got this error: 11:23:32.138: Failed to load shared library 'libpango-1.0.0.dylib' referenced by the typelib: dlopen(libpango-1.0.0.dylib, 9): image not found : Could not open display: /private/tmp/com.apple.launchd.bUJAojAVPX/org.macosforge.xquartz:0

Check that - pango was installed over brew (brew install pango) then change $DYLD_FALLBACK_LIBRARY_PATH env variable to export DYLD_FALLBACK_LIBRARY_PATH=$DYLD_FALLBACK_LIBRARY_PATH:/usr/local/lib in ~/.zshrc

I attempted to solve this error by adding the line to my .zshrc, but still receive the following when running virt-manager.

WARNING **: 12:41:44.338: Failed to load shared library 'libpango-1.0.0.dylib' referenced by the typelib: dlopen(libpango-1.0.0.dylib, 9): image not found
Traceback (most recent call last):
  File "/opt/homebrew/Cellar/virt-manager/3.2.0_3/libexec/bin/virt-manager", line 8, in <module>
    virtmanager.runcli()
  File "/opt/homebrew/Cellar/virt-manager/3.2.0_3/libexec/share/virt-manager/virtManager/virtmanager.py", line 267, in runcli
    main()
  File "/opt/homebrew/Cellar/virt-manager/3.2.0_3/libexec/share/virt-manager/virtManager/virtmanager.py", line 191, in main
    leftovers = _import_gtk(leftovers)
  File "/opt/homebrew/Cellar/virt-manager/3.2.0_3/libexec/share/virt-manager/virtManager/virtmanager.py", line 58, in _import_gtk
    from gi.repository import Gtk
  File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
  File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 664, in _load_unlocked
  File "<frozen importlib._bootstrap>", line 627, in _load_backward_compatible
  File "/opt/homebrew/opt/pygobject3/lib/python3.9/site-packages/gi/importer.py", line 144, in load_module
    importlib.import_module('gi.repository.' + dep.split("-")[0])
  File "/opt/homebrew/Cellar/python@3.9/3.9.5/Frameworks/Python.framework/Versions/3.9/lib/python3.9/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
  File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 664, in _load_unlocked
  File "<frozen importlib._bootstrap>", line 627, in _load_backward_compatible
  File "/opt/homebrew/opt/pygobject3/lib/python3.9/site-packages/gi/importer.py", line 144, in load_module
    importlib.import_module('gi.repository.' + dep.split("-")[0])
  File "/opt/homebrew/Cellar/python@3.9/3.9.5/Frameworks/Python.framework/Versions/3.9/lib/python3.9/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
  File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 664, in _load_unlocked
  File "<frozen importlib._bootstrap>", line 627, in _load_backward_compatible
  File "/opt/homebrew/opt/pygobject3/lib/python3.9/site-packages/gi/importer.py", line 145, in load_module
    dynamic_module = load_overrides(introspection_module)
  File "/opt/homebrew/opt/pygobject3/lib/python3.9/site-packages/gi/overrides/__init__.py", line 118, in load_overrides
    override_mod = importlib.import_module(override_package_name)
  File "/opt/homebrew/Cellar/python@3.9/3.9.5/Frameworks/Python.framework/Versions/3.9/lib/python3.9/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "/opt/homebrew/opt/pygobject3/lib/python3.9/site-packages/gi/overrides/Pango.py", line 41, in <module>
    FontDescription = override(FontDescription)
  File "/opt/homebrew/opt/pygobject3/lib/python3.9/site-packages/gi/overrides/__init__.py", line 195, in override
    assert g_type != TYPE_NONE
AssertionError
J-Siu commented 3 years ago

@austinben If you do ls -1 /usr/local/lib/libpango*, do you see following tango libraries?

/usr/local/lib/libpango-1.0.0.dylib
/usr/local/lib/libpango-1.0.a
/usr/local/lib/libpango-1.0.dylib
/usr/local/lib/libpangocairo-1.0.0.dylib
/usr/local/lib/libpangocairo-1.0.a
/usr/local/lib/libpangocairo-1.0.dylib
/usr/local/lib/libpangoft2-1.0.0.dylib
/usr/local/lib/libpangoft2-1.0.a
/usr/local/lib/libpangoft2-1.0.dylib
austinben commented 3 years ago

@J-Siu

I do not see these on my machine under /usr/local/lib. This directory does not exist on my machine, even though running brew install pango returns that pango is installed and is up to date.

J-Siu commented 3 years ago

@austinben

What about ls -1 /usr/lib/libpango*?

In theory the export you use in .zshrc is redundant because the default of DYLD_FALLBACK_LIBRARY_PATH is /usr/local/lib:/usr/lib. You can check man dyld.

I am a bit surprise you don’t have /usr/local/lib unless you have a very old brew setup. Verify your brew setup with following:

brew update
brew upgrade
brew doctor

The first 2 lines will bring your brew command and packages up to date. The last one will show you pssoible errors or issues. Pay attention if it mention anything about brew link —overwrte … and missing /usr/local/lib. You should create that dir anyway and change ownership to your working login:

sudo mkdir /usr/local/lib
sudo chown <user>:staff /usr/local/lib
austinben commented 3 years ago

What about ls -1 /usr/lib/libpango*?

Nothing.

Created the directory and changed the ownership. Did a re-install of homebrew, pango (through homebrew) and virt-manager. Same error appears. I am on an M1 mini for reference.

J-Siu commented 3 years ago

Double check the location of pango library: ls -lh /usr/local/Cellar/pango/1.48.4/lib/lib*. If they are there, do following:

cd /usr/local/lib
ln -s /usr/local/Cellar/pango/1.48.4/lib/lib* .
austinben commented 3 years ago

The pango libraries were in /opt/homebrew/Cellar/pango/1.48.4/lib and are now linked to /usr/local/lib, unfortunately resulting in the same error as https://github.com/jeffreywildman/homebrew-virt-manager/issues/170#issuecomment-833813209 . This effort may be futile anyways, as I need to use qemu as well, and it has its own share of problems with M1.

I appreciate the effort, thank you.

J-Siu commented 3 years ago

@austinben Try the brew forum, people there are very knowledgeable, https://github.com/homebrew/discussions/discussions

ssurfertuga commented 3 years ago

@austinben Try the brew forum, people there are very knowledgeable, https://github.com/homebrew/discussions/discussions

Hey @J-Siu, I'm having the same problem as @austinben because (I'm almost sure) we are using M1 Macs with Big Sur. Homebrew installs differently on M1s. It goes to /opt/homebrew/ and maybe has different inner mechanics as to linking libs. Also on M1s/Big Sur there's no /usr/local/lib. I guess you're trying to solve this problem the "intel way" :)

Also I'm using bash instead of zsh... I changed my default shell as soon as I started using my new Mac. Can that also present a different set of problems adding to those of libs?

Is it possible that M1s with Big Sur need a different solution?

J-Siu commented 3 years ago

@ssurfertuga

Hey @J-Siu, I'm having the same problem as @austinben because (I'm almost sure) we are using M1 Macs with Big Sur. Homebrew installs differently on M1s. It goes to /opt/homebrew/ and maybe has different inner mechanics as to linking libs. Also on M1s/Big Sur there's no /usr/local/lib. I guess you're trying to solve this problem the "intel way" :)

Did some search and found out that Brew setup is different on M1. M1 brew prefix is /opt/homebrew while on Intel Mac it is /usr/local. Please try:

brew --prefix
ls /opt/homebrew/lib/libpango*

Also I'm using bash instead of zsh... I changed my default shell as soon as I started using my new Mac. Can that also present a different set of problems adding to those of libs?

zsh uses .zshrc and bash uses .bashrc, but the export line syntax is same. If the check above come back positive, the line should be:

export DYLD_FALLBACK_LIBRARY_PATH=$DYLD_FALLBACK_LIBRARY_PATH:/opt/homebrew/lib

Is it possible that M1s with Big Sur need a different solution?

I think the issue so far is related to library search path.

ssurfertuga commented 3 years ago

@J-Siu

Did some search and found out that Brew setup is different on M1. M1 brew prefix is /opt/homebrew while on Intel Mac it is /usr/local. Please try:

I confirm that.

brew --prefix
ls /opt/homebrew/lib/libpango*
spader:/ ramosh$ brew --prefix
/opt/homebrew

spader:/ ramosh$ ls -laG /opt/homebrew/lib/libpango*
lrwxr-xr-x  1 ramosh  admin  47 May  9 15:26 /opt/homebrew/lib/libpango-1.0.0.dylib -> ../Cellar/pango/1.48.4/lib/libpango-1.0.0.dylib
lrwxr-xr-x  1 ramosh  admin  41 May  9 15:26 /opt/homebrew/lib/libpango-1.0.a -> ../Cellar/pango/1.48.4/lib/libpango-1.0.a
lrwxr-xr-x  1 ramosh  admin  45 May  9 15:26 /opt/homebrew/lib/libpango-1.0.dylib -> ../Cellar/pango/1.48.4/lib/libpango-1.0.dylib
lrwxr-xr-x  1 ramosh  admin  52 May  9 15:26 /opt/homebrew/lib/libpangocairo-1.0.0.dylib -> ../Cellar/pango/1.48.4/lib/libpangocairo-1.0.0.dylib
lrwxr-xr-x  1 ramosh  admin  46 May  9 15:26 /opt/homebrew/lib/libpangocairo-1.0.a -> ../Cellar/pango/1.48.4/lib/libpangocairo-1.0.a
lrwxr-xr-x  1 ramosh  admin  50 May  9 15:26 /opt/homebrew/lib/libpangocairo-1.0.dylib -> ../Cellar/pango/1.48.4/lib/libpangocairo-1.0.dylib
lrwxr-xr-x  1 ramosh  admin  50 May  9 15:26 /opt/homebrew/lib/libpangoft2-1.0.0.dylib -> ../Cellar/pango/1.48.4/lib/libpangoft2-1.0.0.dylib
lrwxr-xr-x  1 ramosh  admin  44 May  9 15:26 /opt/homebrew/lib/libpangoft2-1.0.a -> ../Cellar/pango/1.48.4/lib/libpangoft2-1.0.a
lrwxr-xr-x  1 ramosh  admin  48 May  9 15:26 /opt/homebrew/lib/libpangoft2-1.0.dylib -> ../Cellar/pango/1.48.4/lib/libpangoft2-1.0.dylib
spader:/ ramosh$ export
declare -x DYLD_FALLBACK_LIBRARY_PATH=":/opt/homebrew/lib"
declare -x HOME="/Users/ramosh"
declare -x HOMEBREW_CELLAR="/opt/homebrew/Cellar"
declare -x HOMEBREW_PREFIX="/opt/homebrew"
declare -x HOMEBREW_REPOSITORY="/opt/homebrew"
declare -x INFOPATH="/opt/homebrew/share/info:"
declare -x LC_CTYPE="UTF-8"
declare -x LOGNAME="ramosh"
declare -x LaunchInstanceID="D724233B-25DB-40C1-B3FF-A2DB4B6AEA8A"
declare -x MANPATH="/opt/homebrew/share/man:"
declare -x OLDPWD="/"
declare -x PATH="/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Applications/VMware Fusion.app/Contents/Public:/Library/Apple/usr/bin"
declare -x PWD="/"
declare -x SECURITYSESSIONID="186b7"
declare -x SHELL="/bin/bash"
declare -x SHLVL="1"
declare -x SSH_AUTH_SOCK="/private/tmp/com.apple.launchd.bthp1IUJev/Listeners"
declare -x TERM="xterm-256color"
declare -x TERM_PROGRAM="Apple_Terminal"
declare -x TERM_PROGRAM_VERSION="440"
declare -x TERM_SESSION_ID="016AD3F7-B852-4A8C-9864-92412F310028"
declare -x TMPDIR="/var/folders/t6/pnfjjh853dzgcp92khzzlrdr0000gp/T/"
declare -x USER="ramosh"
declare -x XPC_FLAGS="0x0"
declare -x XPC_SERVICE_NAME="0"
declare -x __CFBundleIdentifier="com.apple.Terminal"
spader:/ ramosh$ virt-manager -c test:///default
spader:/ ramosh$ 
** (process:1134): WARNING **: 16:19:03.299: Failed to load shared library 'libpango-1.0.0.dylib' referenced by the typelib: dlopen(libpango-1.0.0.dylib, 9): image not found
Traceback (most recent call last):
  File "/opt/homebrew/Cellar/virt-manager/3.2.0_3/libexec/bin/virt-manager", line 8, in <module>
    virtmanager.runcli()
  File "/opt/homebrew/Cellar/virt-manager/3.2.0_3/libexec/share/virt-manager/virtManager/virtmanager.py", line 267, in runcli
    main()
  File "/opt/homebrew/Cellar/virt-manager/3.2.0_3/libexec/share/virt-manager/virtManager/virtmanager.py", line 191, in main
    leftovers = _import_gtk(leftovers)
  File "/opt/homebrew/Cellar/virt-manager/3.2.0_3/libexec/share/virt-manager/virtManager/virtmanager.py", line 58, in _import_gtk
    from gi.repository import Gtk
  File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
  File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 664, in _load_unlocked
  File "<frozen importlib._bootstrap>", line 627, in _load_backward_compatible
  File "/opt/homebrew/opt/pygobject3/lib/python3.9/site-packages/gi/importer.py", line 144, in load_module
    importlib.import_module('gi.repository.' + dep.split("-")[0])
  File "/opt/homebrew/Cellar/python@3.9/3.9.5/Frameworks/Python.framework/Versions/3.9/lib/python3.9/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
  File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 664, in _load_unlocked
  File "<frozen importlib._bootstrap>", line 627, in _load_backward_compatible
  File "/opt/homebrew/opt/pygobject3/lib/python3.9/site-packages/gi/importer.py", line 144, in load_module
    importlib.import_module('gi.repository.' + dep.split("-")[0])
  File "/opt/homebrew/Cellar/python@3.9/3.9.5/Frameworks/Python.framework/Versions/3.9/lib/python3.9/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
  File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 664, in _load_unlocked
  File "<frozen importlib._bootstrap>", line 627, in _load_backward_compatible
  File "/opt/homebrew/opt/pygobject3/lib/python3.9/site-packages/gi/importer.py", line 145, in load_module
    dynamic_module = load_overrides(introspection_module)
  File "/opt/homebrew/opt/pygobject3/lib/python3.9/site-packages/gi/overrides/__init__.py", line 118, in load_overrides
    override_mod = importlib.import_module(override_package_name)
  File "/opt/homebrew/Cellar/python@3.9/3.9.5/Frameworks/Python.framework/Versions/3.9/lib/python3.9/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "/opt/homebrew/opt/pygobject3/lib/python3.9/site-packages/gi/overrides/Pango.py", line 41, in <module>
    FontDescription = override(FontDescription)
  File "/opt/homebrew/opt/pygobject3/lib/python3.9/site-packages/gi/overrides/__init__.py", line 195, in override
    assert g_type != TYPE_NONE
AssertionError

Still same error... I have no more ideas...

phirestalker commented 3 years ago

@J-Siu - Thank you! it's working!

PS. If anyone got this error: 11:23:32.138: Failed to load shared library 'libpango-1.0.0.dylib' referenced by the typelib: dlopen(libpango-1.0.0.dylib, 9): image not found : Could not open display: /private/tmp/com.apple.launchd.bUJAojAVPX/org.macosforge.xquartz:0

Check that - pango was installed over brew (brew install pango) then change $DYLD_FALLBACK_LIBRARY_PATH env variable to export DYLD_FALLBACK_LIBRARY_PATH=$DYLD_FALLBACK_LIBRARY_PATH:/usr/local/lib in ~/.zshrc

I ran the export line in the terminal (I'm still using bash) and I still get the error. Do I need to reinstall virt-manager as well?

J-Siu commented 3 years ago

@ssurfertuga Sorry, I ran out of idea.

J-Siu commented 3 years ago

@phirestalker Are you using the one I post? I assume you are not on M1, right?

phirestalker commented 3 years ago

@phirestalker Are you using the one I post? I assume you are not on M1, right?

Sorry forgot to read all the posts after. I am in the same boat as ssurfertuga I am using Big Sur with an M1 mac

$ export
declare -x DISPLAY=":0"
declare -x DYLD_FALLBACK_LIBRARY_PATH="/usr/local/lib:/opt/homebrew/lib"
J-Siu commented 3 years ago

@phirestalker Since you are on M1, the export should be:

export DYLD_FALLBACK_LIBRARY_PATH="/opt/homebrew/lib”

Check:

ls -lh /opt/homebrew/lib/libpango*
phirestalker commented 3 years ago

that did not work. I do have the files in /opt/homebrew/lib though.

J-Siu commented 3 years ago

@phirestalker ok, seems DYLD_FALLBACK_LIBRARY_PATH is not working as intended in M1. Try following:

DYLD_LIBRARY_PATH=/opt/homebrew/lib virt-manager
phirestalker commented 3 years ago

@phirestalker ok, seems DYLD_FALLBACK_LIBRARY_PATH is not working as intended in M1. Try following:

DYLD_LIBRARY_PATH=/opt/homebrew/lib virt-manager

no dice. I get the same error

timscha commented 3 years ago

I am having the same problem as @phirestalker and tried all steps as well. I am on a M1 Mac.

mars1512 commented 3 years ago

The virt-manager installed worked well on MacOS BigSur(M1) with steps provided by @J-Siu, thank you very much! Now, facing same issue of Failed to load shared library 'libpango-1.0.0.dylib' referenced by the typelib: dlopen(libpango-1.0.0.dylib, 9): image not found

veronicajk commented 2 years ago

@J-Siu's solution at https://github.com/jeffreywildman/homebrew-virt-manager/issues/170#issuecomment-822341574 worked for me too! I'm now successfully running virt-manager on Mojave Mac OSX 10.14.6. Thank you so much! :)

amorphina commented 2 years ago

Only updating libvirt-python to 7.2.0 didn't work for me.

I don't know ruby and don't understand homebrew build system, I just brute force my way through it. 🤦

I end up doing following:

brew uninstall virt-manager
cd /usr/local/bin
# They were not symlink in my box, I have to manually delete them
rm virt-clone virt-intall virt-manager virt-xml

Then brew edit virt-manager and changed following:

  • Update virt-manager source to 3.2.0
  • Add depends_on "docutils" for rst2man
  • Update libvirt-python to 7.2.0 as suggested. (Tried to remove it as brew has the package, but then virt-manager fail to run.)
  • Use python3 instead of python in def install section.
  • Update sha256 when error pop up during brew install
  • Comment out the patch line as it doesn't apply for 3.2.0. (I setup ssh key for my target box.)

Following is my current working formula, use at your own risk:

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 "docutils"
  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"

  resource "libvirt-python" do
    url "https://libvirt.org/sources/python/libvirt-python-7.2.0.tar.gz"
    sha256 "c0c3bac54c55622e17927b09cd9843869600d71842fb072c99491fe2608dcee7"
  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/python3", "setup.py",
                     "configure",
                     "--prefix=#{libexec}"
    system "#{libexec}/bin/python3", "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")

After hours spent and installing half of homebrew + xCode + Commandline Tools, your solution worked great for me!

darenjacobscellwize commented 2 years ago

Only updating libvirt-python to 7.2.0 didn't work for me.

I don't know ruby and don't understand homebrew build system, I just brute force my way through it. 🤦

I end up doing following:

brew uninstall virt-manager
cd /usr/local/bin
# They were not symlink in my box, I have to manually delete them
rm virt-clone virt-intall virt-manager virt-xml

Then brew edit virt-manager and changed following:

  • Update virt-manager source to 3.2.0
  • Add depends_on "docutils" for rst2man
  • Update libvirt-python to 7.2.0 as suggested. (Tried to remove it as brew has the package, but then virt-manager fail to run.)
  • Use python3 instead of python in def install section.
  • Update sha256 when error pop up during brew install
  • Comment out the patch line as it doesn't apply for 3.2.0. (I setup ssh key for my target box.)

Following is my current working formula, use at your own risk:

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 "docutils"
  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"

  resource "libvirt-python" do
    url "https://libvirt.org/sources/python/libvirt-python-7.2.0.tar.gz"
    sha256 "c0c3bac54c55622e17927b09cd9843869600d71842fb072c99491fe2608dcee7"
  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/python3", "setup.py",
                     "configure",
                     "--prefix=#{libexec}"
    system "#{libexec}/bin/python3", "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")

the command "brew edit virt-manager" does not work