Giter VIP home page Giter VIP logo

Comments (8)

zagrodzki avatar zagrodzki commented on May 19, 2024

Which version of Go and which version of libusb?

from gousb.

willemcvu avatar willemcvu commented on May 19, 2024

libusb-1.0-0 and go1.10.3.
I also tried go1.8, same exact issue.

from gousb.

zagrodzki avatar zagrodzki commented on May 19, 2024

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.

willemcvu avatar willemcvu commented on May 19, 2024

Whoops, sorry!
2:1.0.11-1 is the version I'm using (as returned from dpkg).

from gousb.

zagrodzki avatar zagrodzki commented on May 19, 2024

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.

willemcvu avatar willemcvu commented on May 19, 2024

OK, thanks a ton, I will try upgrading my distro.

from gousb.

Gustavomurta avatar Gustavomurta commented on May 19, 2024

Updated Gousb instructions for Raspberry Pi :

Installing Golang on Raspberry Pi:
https://forums.raspberrypi.com/viewtopic.php?f=28&t=317369&p=1926129#p1926129

  1. You must first install libusb-1.0
    apt-get install libusb-1.0-0-dev

  2. 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#

  3. 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#

  4. Test the Gousb installation by compiling and running the example lsusb
    https://github.com/google/gousb/tree/master/lsusb/

from gousb.

zagrodzki avatar zagrodzki commented on May 19, 2024

@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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.