Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 9 of 9

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

  1. #1
    Junior Member
    Join Date
    Dec 2013
    Location
    Sweden
    Posts
    7

    [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 by emilhem; 12-19-2016 at 03:16 PM. Reason: Updated topic name

  2. #2
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    22,643
    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?
    Attached Files Attached Files

  3. #3
    Junior Member
    Join Date
    Dec 2013
    Location
    Sweden
    Posts
    7
    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?

  4. #4
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    22,643
    Quote Originally Posted by emilhem View Post
    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?

  5. #5
    Senior Member+ KurtE's Avatar
    Join Date
    Jan 2014
    Posts
    7,615
    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...

  6. #6
    Junior Member
    Join Date
    Dec 2013
    Location
    Sweden
    Posts
    7

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

    Quote Originally Posted by KurtE View Post
    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 by emilhem; 12-19-2016 at 03:18 PM. Reason: Updated topic name

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

  8. #8
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    22,643
    I've added a link to this thread from the readme file.

    https://github.com/PaulStoffregen/te...176d2eec7d8R16

    Hopefully that will help people find these tips for Linux systems.

  9. #9
    maheshmahihu
    Guest
    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

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •