[Linux 64bit][Arduino 1.6.13] Issues starting Teensy Loader and libusb-0.1.so.4 error

emilhem

Member
[Solved][ArchLinux 64bit][Arduino 1.6.13] Teensy Loader and libusb-0.1.so.4 error

I'm using ArchLinux 64 bit and have installed the official Arduino (64 bit) version 1.6.13 from Arduino.cc
I'm using Teensy Loader 1.34 Beta #1
I have a Teensy 3.2

I have installed Arduino first and then Teensyloader to /home/emil/software/arduino-1.6.13

I run Arduino and try to Verify the Blink test program then this happens:
Code:
Opening Teensy Loader...
Unable find Teensy Loader.  (p)  Is the Teensy Loader application running?
Error compiling for board Teensy 3.2 / 3.1.

I try to open Teensy Loader manually from /home/emil/software/arduino-1.6.13/hardware/tools and it starts correctly.

Now, when pressing Verify it works correctly but when pressing Upload it outputs the following:
Code:
Sketch uses 11,616 bytes (4%) of program storage space. Maximum is 262,144 bytes.
Global variables use 3,408 bytes (5%) of dynamic memory, leaving 62,128 bytes for local variables. Maximum is 65,536 bytes.
/home/emil/software/arduino-1.6.13/hardware/teensy/../tools/teensy_reboot: error while loading shared libraries: libusb-0.1.so.4: cannot open shared object file: No such file or directory
/home/emil/software/arduino-1.6.13/hardware/teensy/../tools/teensy_reboot: error while loading shared libraries: libusb-0.1.so.4: cannot open shared object file: No such file or directory

I checked that lsusb was installed and it was. I also checked the directory of teensy_reboot and the libusb-0.1.so.4 is there.
 
Last edited:
Please give this file a try. It needs to be extracted in that hardware/tools folder, where libusb-0.1.so.4 is located.

Does this version work on Arch?
 

Attachments

  • teensy_reboot.zip
    9.7 KB · Views: 441
It did not work.

The issue doesn't stop me from working since I can just press the button on the Teensy and set the Teensyloader to auto.

Code:
Sketch uses 11,616 bytes (4%) of program storage space. Maximum is 262,144 bytes.
Global variables use 3,408 bytes (5%) of dynamic memory, leaving 62,128 bytes for local variables. Maximum is 65,536 bytes.
An error occurred while uploading the sketch
/home/emil/software/arduino-1.6.13/hardware/teensy/../tools/teensy_reboot: error while loading shared libraries: libusb-0.1.so.4: cannot open shared object file: No such file or directory

The issue is that from wherever arduinos CWD (current working directory) is the teensy_reboot is trying to find the library libusb.

One solution is to copy the libraries to somewhere in the /usr directory perhaps?
 
The issue is that from wherever arduinos CWD (current working directory) is the teensy_reboot is trying to find the library libusb.

Sorry, that change (adding "rpath=." to the linker flags) was the limit of what I can try to do to get it to look in the current working dir for the library.

One solution is to copy the libraries to somewhere in the /usr directory perhaps?

Usually there are several creative ways to solve such problems. Perhaps Arch may have a package you can install to get this library?

I'm afraid I'm out of ideas and I've reached the end of what I can do to help. I really only test and support Ubuntu. Other Linux distros usually work. But when they don't, I just can't get into the details. But I can tell you, in Teensy's 9 year history, two distros have accounted for nearly all Linux compatibility problems: Gentoo and Arch.

Maybe try using Ubuntu?
 
[Solved][ArchLinux 64bit][Arduino 1.6.13] Teensy Loader and libusb-0.1.so.4 error

I don't use Arch, but doing a quick search, i found the site: https://bbs.archlinux.org/viewtopic.php?id=186130

Which someone else was having problem with needing this library which was solved by:
Code:
yaourt -S lib32-libusb lib32-libusb-compat
Again I know nothing...

You are a saviour!! Well, I read that topic and installed libusb-compat ("pacman -S libusb-compat" for all you awesome ArchLinux users out there). It solved the issue!

The reason I didn't need the other parts of the topic is because of both Arch and TeensyLoader being 64 bit.

-- EDIT --

Also, I found this out by removing libusb-0.1.so.4 and running ldd on teensy to find out if it found libusb or not.
 
Last edited:
Same issue with my new system, only I run a fresh Ubuntu 17.04
This was the fix for me
"sudo apt-get install libusb-dev"

Documenting for the future :D
 
You are a saviour!! Well, I read that topic and installed libusb-compat ("pacman -S libusb-compat" for all you awesome ArchLinux users out there). It solved the issue!

The reason I didn't need the other parts of the topic is because of both Arch and TeensyLoader being 64 bit.

-- EDIT --

Also, I found this out by removing libusb-0.1.so.4 and running ldd on teensy to find out if it found libusb or not
 
Back
Top