Search code examples
linuxarduinomanjaro

Micronucleus does not update


I'm trying to upgrade my micronuclues to upload my code to digispark,but when I try to upgrade that happens:

Building command line tool: micronucleus...
gcc  -Ilibrary -O -g -D LINUX -o micronucleus micronucleus.c micronucleus_lib.o littleWire_util.o -static -L/usr/lib/x86_64-linux-gnu -lusb
/usr/bin/ld: cannot find -lusb
collect2: error: ld returned 1 exit status
make: *** [Makefile:61: micronucleus] Error 1

Solution

  • I'm a little confused as to how you've gotten it compiling but not linking because, at least on Debian based distributions, the header file that would be needed during compiling is provided by the same package that provides the libusb.a that it is failing to link against.

    If you are on a Debian based distro, try (re)installing libusb-dev:

    sudo apt install libusb-dev
    

    This is what I've built it against locally.

    If you have a libusb.a and it's not in /usr/lib/x86_64-linux-gnu, then you'd need a different directory supplied to -L.