Comments (8)
Which version of Go and which version of libusb?
from gousb.
libusb-1.0-0
and go1.10.3
.
I also tried go1.8
, same exact issue.
from gousb.
libusb-1.0-0 is not helpful, unfortunately, that's the name of the package (Debian or Ubuntu, I'm guessing), but not the version. dpkg -l libusb-1.0-0 should help.
from gousb.
Whoops, sorry!
2:1.0.11-1 is the version I'm using (as returned from dpkg).
from gousb.
1.0.11 was released in May 2012, so I think it's fair to call it really old... Port number function was added few days later in May 2012, and kernel autodetach was added in June 2013. The first version that includes both was 1.0.16, released Jul 2013. Current version is 1.0.22.
If that is indeed Debian wheezy, you'll either need to install 1.0.19 from wheezy-backports or upgrade to jessie.
from gousb.
OK, thanks a ton, I will try upgrading my distro.
from gousb.
Updated Gousb instructions for Raspberry Pi :
Installing Golang on Raspberry Pi:
https://forums.raspberrypi.com/viewtopic.php?f=28&t=317369&p=1926129#p1926129
-
You must first install libusb-1.0
apt-get install libusb-1.0-0-dev -
Test the Libusb installation with these commands. Make sure the folders are correct (very important).
Examples:
root@raspberrypi:/home/pi# pkg-config --cflags libusb-1.0
-I/usr/include/libusb-1.0
root@raspberrypi:/home/pi# pkg-config --libs libusb-1.0
-lusb-1.0
root@raspberrypi:/home/pi# -
Install the Gousb package, with this command and no message of errors:
Example:
root@raspberrypi:/home/pi/go#go get -v github.com/google/gousb (It might take a while)
github.com/google/gousb
root@raspberrypi:/home/pi/go# -
Test the Gousb installation by compiling and running the example lsusb
https://github.com/google/gousb/tree/master/lsusb/
from gousb.
@Gustavomurta I don't think your instructions help - first, the problem mentioned in this question was exactly that the libusb
that came with the distribution (as installed by apt-get
in your documentation) was too old and didn't have the required functions.
Second, your instructions are specific to Debian-flavor of Raspberry Pi (Raspbian etc) and not generally useful for other distributions (SUSE, Gentoo, Arch etc.).
from gousb.
Related Issues (20)
- Clear installation of Gosub on the Windows 10 - using msys64 HOT 3
- Latest package not picked up by go get HOT 9
- I can't open hp printer device with gousb HOT 7
- why connect printer return code -5? HOT 1
- Linux: How to get block devices list provided by usb stick? HOT 1
- incorrect device class HOT 2
- WinUSB drivers HOT 3
- libusb: bad access [code -3] HOT 8
- Windows: go build github.com/google/gousb: C:\Program Files\Go\pkg\tool\windows_amd64\cgo.exe: exit status 2 HOT 1
- Can't detach kernel driver. Invalid param [code -2] for iOS 16 devices HOT 5
- How to use in a Docker container without --privileged HOT 1
- CDC device HOT 5
- A lot of interrupted errors on MacOSX: handle_events: error: libusb: interrupted [code -10] HOT 8
- Failed to claim interface 0 HOT 1
- Errors on install; macos HOT 3
- Error when WriteContext is called HOT 10
- Device detach: libusb: error [darwin_claim_interface] USBInterfaceOpen: another process has device opened for exclusive access HOT 3
- Memory Leak in CGO part HOT 1
- Memory Leak HOT 4
- Android Support HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gousb.