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

Install error: failed virConnectNodeDeviceEventRegisterAny #57

Closed
markabrahams opened this issue Sep 4, 2016 · 23 comments
Closed

Install error: failed virConnectNodeDeviceEventRegisterAny #57

markabrahams opened this issue Sep 4, 2016 · 23 comments

Comments

@markabrahams
Copy link

On installing virt-manager, I get the error:

MacBook:Downloads mark$ brew doctor
Your system is ready to brew.
MacBook:Downloads mark$ brew install virt-manager
==> Installing virt-manager from jeffreywildman/virt-manager
==> Downloading https://fedorahosted.org/released/virt-manager/virt-manager-1.4.0.tar.gz
Already downloaded: /Users/mark/Library/Caches/Homebrew/virt-manager-1.4.0.tar.gz
==> Patching
patching file virt-clone
patching file virt-convert
patching file virt-install
patching file virt-manager
patching file virt-xml
==> Downloading https://libvirt.org/sources/python/libvirt-python-2.1.0.tar.gz
Already downloaded: /Users/mark/Library/Caches/Homebrew/virt-manager--libvirt-python-2.1.0.tar.gz
==> python -c import setuptools... --no-user-cfg install --prefix=/usr/local/Cellar/virt-manager/1.4.0/libexec/vendor --single-version-externally-managed --record=installed.
Last 15 lines from /Users/mark/Library/Logs/Homebrew/virt-manager/01.python:
--prefix=/usr/local/Cellar/virt-manager/1.4.0/libexec/vendor
--single-version-externally-managed
--record=installed.txt

running install
running build
/usr/local/opt/pkg-config/bin/pkg-config --print-errors --atleast-version=0.9.11 libvirt
/usr/bin/python generator.py libvirt /usr/local/Cellar/libvirt/2.2.0/share/libvirt/api/libvirt-api.xml
Found 415 functions in /usr/local/Cellar/libvirt/2.2.0/share/libvirt/api/libvirt-api.xml
Found 0 functions in libvirt-override-api.xml
Generated 344 wrapper functions
Missing type converters:
virConnectNodeDeviceEventGenericCallback:1
ERROR: failed virConnectNodeDeviceEventRegisterAny
error: command '/usr/bin/python' failed with exit status 1

READ THIS: https://git.io/brew-troubleshooting
If reporting this issue please do so at (not Homebrew/brew):
https://github.com/jeffreywildman/homebrew-virt-manager/issues

@timm088
Copy link

timm088 commented Sep 6, 2016

Same issue here, seemed to have occurred after I ran a clear and fresh install on brew.

Some more of the error

error: command '/usr/bin/python' failed with exit status 1

READ THIS: https://git.io/brew-troubleshooting
If reporting this issue please do so at (not Homebrew/brew):
  https://github.com/jeffreywildman/homebrew-virt-manager/issues

/usr/local/Library/Homebrew/utils/github.rb:206:in `raise_api_error': GitHub { (GitHub::AuthenticationFailedError)
  "message": "Must specify two-factor authentication OTP code.",
  "documentation_url": "https://developer.github.com/v3/auth#working-with-two-factor-authentication"
}

The GitHub credentials in the OS X keychain may be invalid.
Clear them with:
  printf "protocol=https\nhost=github.com\n" | git credential-osxkeychain erase
Or create a personal access token:
  https://github.com/settings/tokens/new?scopes=&description=Homebrew
and then set the token as: export HOMEBREW_GITHUB_API_TOKEN="your_new_token"
        from /usr/local/Library/Homebrew/utils/github.rb:174:in `open'
        from /usr/local/Library/Homebrew/utils/github.rb:219:in `issues_matching'
        from /usr/local/Library/Homebrew/utils/github.rb:252:in `issues_for_formula'
        from /usr/local/Library/Homebrew/exceptions.rb:312:in `fetch_issues'
        from /usr/local/Library/Homebrew/exceptions.rb:308:in `issues'
        from /usr/local/Library/Homebrew/exceptions.rb:353:in `dump'
        from /usr/local/Library/Homebrew/brew.rb:130:in `rescue in <main>'
        from /usr/local/Library/Homebrew/brew.rb:30:in `<main>'

@timm088
Copy link

timm088 commented Sep 7, 2016

Pretty much tried everything I can on this one. Completely cleared every brew package.

Tried suggestions from #39 , no dice.
Same error every time.

Missing type converters:
virConnectNodeDeviceEventGenericCallback:1
ERROR: failed virConnectNodeDeviceEventRegisterAny
error: command '/usr/local/opt/python/bin/python2.7' failed with exit status 1

@tomgagnier
Copy link

I am experiencing same issue.

I am using the latest python distributed by home brew (2.7.2)

The install of virt-viewer works, btw.

`
❯❯❯brew install virt-manager
==> Installing virt-manager from jeffreywildman/virt-manager
==> Downloading https://fedorahosted.org/released/virt-manager/virt-manager-1.4.0.tar.gz
Already downloaded: /Users/tgagnier/Library/Caches/Homebrew/virt-manager-1.4.0.tar.gz
==> Patching
patching file virt-clone
patching file virt-convert
patching file virt-install
patching file virt-manager
patching file virt-xml
==> Downloading https://libvirt.org/sources/python/libvirt-python-2.1.0.tar.gz
Already downloaded: /Users/tgagnier/Library/Caches/Homebrew/virt-manager--libvirt-python-2.1.0.tar.gz
==> python -c import setuptools... --no-user-cfg install --prefix=/usr/local/Cellar/virt-manager/1.4.0/libexec/vendor --single-version-externally-managed --re
Last 15 lines from /Users/tgagnier/Library/Logs/Homebrew/virt-manager/01.python:
--prefix=/usr/local/Cellar/virt-manager/1.4.0/libexec/vendor
--single-version-externally-managed
--record=installed.txt

running install
running build
/usr/local/opt/pkg-config/bin/pkg-config --print-errors --atleast-version=0.9.11 libvirt
/usr/local/opt/python/bin/python2.7 generator.py libvirt /usr/local/Cellar/libvirt/2.2.0/share/libvirt/api/libvirt-api.xml
Found 415 functions in /usr/local/Cellar/libvirt/2.2.0/share/libvirt/api/libvirt-api.xml
Found 0 functions in libvirt-override-api.xml
Generated 344 wrapper functions
Missing type converters:
virConnectNodeDeviceEventGenericCallback:1
ERROR: failed virConnectNodeDeviceEventRegisterAny
error: command '/usr/local/opt/python/bin/python2.7' failed with exit status 1
`

@wparam-fox
Copy link

I was able to install this just fine, but that seems to be because I generally don't update brew (or anything else, unless it's broken). My build was from july 11th. I have been able to get this to work on a clean system, starting from a clean brew install, with the following commands: (Do these after you install, after you brew tap the virt-manager keg, but BEFORE you do anything else.)

cd /usr/local/Library/Taps/homebrew/homebrew-core/
git fetch --depth 4500
git checkout 277a4fe16f2a0622be312a4bbe0098fa8f3c38dc

cd /usr/local/Library/Taps/jeffreywildman/homebrew-virt-manager/
git fetch --unshallow
git checkout 335e5a8

cd /usr/local
git fetch --unshallow
git checkout c65be8879d4fc99b120701f2128520c92860c4f0

This updates those three locations to roughly around the time of july 11th, which is where my build came from. It will get you a lot of old stuff, though. I haven't yet tried to do a brew upgrade of things on my system, and I wouldn't be surprised if that makes things explode. But, if you've got an emergency where you need virt-manager RTFN, this will hopefully help.

The trouble seems to come from something which is separate from the virt manager packages, because nuking your cache and running these commands, AFTER you see the failure, does not improve things.

I've attached two brew list outputs, one from the clean VM with the above commands run (virt-working), and one from brew latest where it failed. I suspect somewhere in the diff of the two is the package that's hosing us, assuming it's not libvirt itself.
virt-failed.txt
virt-working.txt

@tomgagnier
Copy link

Thank you for the script and instructions. They work!

I had to uninstall and untap all virt packages, re-tap and re-install.

@wparam-fox
Copy link

wparam-fox commented Sep 7, 2016

Combining the advice of @tomgagnier with what I had, this sequence of commands seems to work even after you've tried and failed, and as far as I can tell, doesn't leave brew in a wonky state. These commands are intended to be run after you've already tried the brew install virt-manager and had it fail. It will install several older versions alongside what you have, and should get to the end ok. After it finishes, and you're back on master, brew outdated will show libvirt and shared-mime-info in addition to whatever else you haven't upgraded. I have successfully run brew upgrade on this, and the commands complete, and virt-manager still works. I've even run brew cleanup, and things don't fall over. So I'm cautiously optimistic.

brew remove libvirt
brew remove libvirt-glib
brew untap jeffreywildman/virt-manager
brew tap jeffreywildman/homebrew-virt-manager

cd /usr/local/Library/Taps/homebrew/homebrew-core/
git fetch --depth 4500
git checkout 277a4fe16f2a0622be312a4bbe0098fa8f3c38dc

cd /usr/local/Library/Taps/jeffreywildman/homebrew-virt-manager/
git fetch --unshallow
git checkout 335e5a8

cd /usr/local
git fetch --unshallow
git checkout c65be8879d4fc99b120701f2128520c92860c4f0

brew install virt-manager virt-viewer

cd /usr/local/Library/Taps/homebrew/homebrew-core/
git checkout master

cd /usr/local/Library/Taps/jeffreywildman/homebrew-virt-manager/
git checkout master

cd /usr/local
git checkout master

brew update

After that, optionally:

brew upgrade
brew cleanup

Edit: A few people here have tried this, and are getting an error on virt-manager startup, but after that it does seem to be working properly. I'm guessing (with precisely zero evidence) this is what was fixed by some of the more recent changes to this repo, so hopefully once this issue is resolved, we can rebuild and get rid of that.

@timm088
Copy link

timm088 commented Sep 8, 2016

@tomgagnier @wparam-fox awesome stuff, works here, no more errors.
Including the optional steps. Cheers!

@myMartek
Copy link

If I follow your workaround I get an error, that there is a libtiff patch not available which is because of that older version of homebrew core I guess.

@Nethe
Copy link

Nethe commented Sep 20, 2016

I followed steps above (wparam-fox ) and it worked. Thanks.

@fsoppelsa
Copy link

With latest Xcode and after brew upgrade I still have the issue

Missing type converters: 
virConnectNodeDeviceEventGenericCallback:1 
ERROR: failed virConnectNodeDeviceEventRegisterAny
error: command '/usr/local/opt/python/bin/python2.7' failed with exit status 1

I tried the workaround above, no success.

BTW, what's the directory where to git fetch --unshallow at step 3?

@Nethe
Copy link

Nethe commented Sep 20, 2016

fsoppelsa
I did it in

/usr/local/Homebrew/

@fsoppelsa
Copy link

Thanks @Nethe works :)

@myMartek
Copy link

myMartek commented Sep 21, 2016

Fails for me with

==> Installing jeffreywildman/virt-manager/virt-manager dependency: libtiff
==> Downloading http://download.osgeo.org/libtiff/tiff-4.0.6.tar.gz
######################################################################## 100,0%
==> Downloading https://mirrors.ocf.berkeley.edu/debian/pool/main/t/tiff/tiff_4.0.6-1.debian.tar.xz

curl: (22) The requested URL returned error: 404 Not Found
Trying a mirror...
==> Downloading https://mirrorservice.org/sites/ftp.debian.org/debian/pool/main/t/tiff/tiff_4.0.6-1.debian.tar.xz

curl: (22) The requested URL returned error: 404 Not Found
Error: Failed to download resource "libtiff--patch"
Download failed: https://mirrorservice.org/sites/ftp.debian.org/debian/pool/main/t/tiff/tiff_4.0.6-1.debian.tar.xz

@ki-media
Copy link

Same here. Workaround not working anymore with above errors.

@Ryuchen
Copy link

Ryuchen commented Sep 22, 2016

Same here no solutions found yet.

@Nethe
Copy link

Nethe commented Sep 22, 2016

@ki-media @Ryuchen

I just tested again the steps shown above, and I must say it is working. I am working on OSX Sierra.
Please try to follow steps/commands below: (i know, i am repeating previous reply, but my paths are little bit different)

cd /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core
git fetch --depth 4500
git checkout 277a4fe16f2a0622be312a4bbe0098fa8f3c38dc

/usr/local/Homebrew/Library/Taps/jeffreywildman/homebrew-virt-manager
git fetch --unshallow
git checkout 335e5a8

cd /usr/local/Homebrew
git fetch --unshallow
git checkout c65be8879d4fc99b120701f2128520c92860c4f0

I also had to do (it was Homebrew's request):
brew link intltool dbus xz pcre jpeg pixman cairo gobject-introspection gdk-pixbuf atk libepoxy hicolor-icon-theme gsettings-desktop-schemas gnome-icon-theme gmp nettle wget check glib-networking vala libsoup py2cairo pygobject3 libosinfo yajl libvirt-glib libusb usbredir spice-gtk vte3

Once steps above are finished, you can start the virt-manager and virt-viewer installation using command below:

brew install virt-manager virt-viewer

It should work. If not, please paste the output with errors.

@ki-media
Copy link

@Nethe
Sure I noticed the paths above were wrong. I corrected them as you did. Just tried your Approach again. Same Errors:

"==> Downloading https://mirrors.ocf.berkeley.edu/debian/pool/main/t/tiff/tiff_4.0.6-1.debian.tar.xz

curl: (22) The requested URL returned error: 404 Not Found
Trying a mirror...
==> Downloading https://mirrorservice.org/sites/ftp.debian.org/debian/pool/main/t/tiff/tiff_4.0.6-1.debian.tar.xz

curl: (22) The requested URL returned error: 404 Not Found
Error: Failed to download resource "libtiff--patch"
Download failed: https://mirrorservice.org/sites/ftp.debian.org/debian/pool/main/t/tiff/tiff_4.0.6-1.debian.tar.xz"

@lalith-b
Copy link

I'm having the same trouble as above after trying the same thing on OSX Sierra.

@p0ns
Copy link

p0ns commented Sep 24, 2016

Fixed that last libtiff error using git checkout d58f19cfe052ee357ad6885d62ee7fca8c264cf3 on homebrew-core

@danifunker
Copy link

I resolved that issue by install jpeg

brew install jpeg
followed by
brew install lib tiff

@Ryuchen
Copy link

Ryuchen commented Sep 24, 2016

@p0ns
I follow you steps but I got the following error:
==> Installing jeffreywildman/virt-manager/virt-manager dependency: libcroco
==> Downloading https://download.gnome.org/sources/libcroco/0.6/libcroco-0.6.11.tar.xz
==> Downloading from http://ftp.nara.wide.ad.jp/pub/X11/GNOME/sources/libcroco/0.6/libcro
######################################################################## 100.0%
==> ./configure --prefix=/usr/local/Cellar/libcroco/0.6.11 --disable-Bsymbolic
Last 15 lines from /Users/ryu/Library/Logs/Homebrew/libcroco/01.configure:
checking whether to build gtk-doc documentation... no
checking for GTKDOC_DEPS... yes
checking for CROCO... no
configure: error: Package requirements (
glib-2.0 >= 2.0
libxml-2.0 >= 2.4.23) were not met:

No package 'libxml-2.0' found

Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.

Alternatively, you may set the environment variables CROCO_CFLAGS
and CROCO_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.

READ THIS: https://git.io/brew-troubleshooting
If reporting this issue please do so at (not Homebrew/brew):
https://github.com/Homebrew/homebrew-core/issues

Warning: You are using OS X 10.12.
We do not provide support for this pre-release version.
You may encounter build failures or other breakages.

@bendinwire
Copy link

git checkout 277a4fe16f2a0622be312a4bbe0098fa8f3c38dc

This ^ doesn't work for me.
I get

fatal: reference is not a tree: 277a4fe16f2a0622be312a4bbe0098fa8f3c38dc

Any suggestions? Thanks

@jeffreywildman
Copy link
Owner

Original issue looks like a duplicate of #90 and shows a mismatch of libvirt-python and libvirt versions. Should be addressed on master now. Please try to reinstall and open a new issue if it reoccurs.

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