Arduino IDE on Mac can't upload sketch

After installing precompiled tools using the Arduino IDE and building the “Blink” example, the upload fails with this message:

Sketch uses 5954 bytes (0%) of program storage space. Maximum is 8388608 bytes.
dyld: Library not loaded: /usr/local/opt/libusb-compat/lib/libusb-0.1.4.dylib
  Referenced from: /Users/dalnefre/Library/Arduino15/packages/sifive/tools/openocd/9bab0782d313679bb0bfb634e6e87c757b8d5503/bin/openocd
  Reason: image not found
An error occurred while uploading the sketch
1 Like

I got the same problem on Mac and solved it as follows:

Install Homebrew; see:

https://brew.sh

Install libusb-compat with (in Terminal):

brew install libusb-compat