0

I cloned go-ethereum, and used go mod vender. When make, it's failed! and the error info is:

# github.com/karalabe/usb
vendor/github.com/karalabe/usb/hid_enabled.go:22:10: fatal error: ./hidapi/hidapi/hidapi.h: No such file or directory
   22 | #include "./hidapi/hidapi/hidapi.h"
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
4
  • You will need to install libhidapi for your system. Commented Apr 26, 2021 at 9:34
  • Thanks! But if I compile without "go mod vender", it's ok... Is there any way to disable the usb wallet?
    – euclan
    Commented Apr 27, 2021 at 1:50
  • did you solve this?
    – TommyF
    Commented Jun 18, 2021 at 13:46
  • no. So i compile without "go mod vendor"
    – euclan
    Commented Jul 14, 2021 at 3:49

1 Answer 1

0

Ran into the same issue when deploying to Google App Engine the other day.

A workaround is to

$ go mod vendor
$ cd vendor/github.com/karalabe
$ rm -rf usb
$ git clone https://github.com/karalabe/usb

This solves the problem of missing files I have no idea though if there are other unwanted side effects! So use with caution.

1
  • 1
    Thanks, it's work! the 2nd step is : cd vendor/github.com/karalabe
    – euclan
    Commented Sep 8, 2021 at 6:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.