Issue with Teensy loader when using WSL (Windows Subsystem for Linux)

Status
Not open for further replies.

Puffin

New member
I've tried installing the Teensy loader in WSL so that I can program in a Linux environment.
I followed the instructions for installing on Ubuntu. The error I'm getting is a missing library (see console output below).

I'm not sure whether this error is related to WSL, but I don't have a separate Linux PC to test that on at the moment.

Code:
jakob@DESKTOP:~/Downloads$ ls /etc/udev/rules.d/
49-teensy.rules
jakob@DESKTOP:~/Downloads$ ls
libpng12.so.0  libusb-0.1.so.4  teensy  teensy_linux64.tar.gz
jakob@DESKTOP:~/Downloads$ ./teensy &
[1] 2162
jakob@DESKTOP:~/Downloads$ ./teensy: error while loading shared libraries: libgtk-x11-2.0.so.0: cannot open shared object file: No such file or directory
^C
[1]+  Exit 127                ./teensy
jakob@DESKTOP:~/Downloads$
 
Officially, PJRC only tests and supports this Linux-based software on Ubuntu, and only Ubuntu running on real hardware (not virtual machines). Most other Linux systems tend to work, but we don't test with any others and we (usually) don't alter the software to suit any other Linux distros or systems. When it doesn't work on a non-Ubuntu system, your only path is to try to install the stuff that system is missing. Or you can just use Ubuntu.

However, libgtk2.0 is among the most commonly used libraries for GUI-based software on Linux. If you're missing this library, very likely you have a console-only system which isn't capable of running graphical software. If you can't install the graphical system stuff, this command line program might be what you need. Maybe?

https://github.com/PaulStoffregen/teensy_loader_cli

If you want to run the GUI version, you're going to need to set up X11 and GTK and all the other usual graphical environment which Ubuntu and most other Linux systems provide. Lots of info can be found online. Here's a couple that turned up by a quick Google search.

https://askubuntu.com/questions/897846/cant-run-gtk-on-wsl-display-error

https://stackoverflow.com/questions/58877471/installing-wxpython-on-wsl-with-gtk2

But again, I want to emphasize that PJRC's position on Linux is only Ubuntu is officially supported. Most others tend to work, but when they don't, you're mostly on your own to figure out how to install or fix the stuff they're missing.
 
I could be wrong, but I don't think this will work. The Ubuntu window is a command line orientated setup, and I don't believe it has any graphical setup built in.

Not sure how well it would work, but I believe there are a few websites showing ways to add a linux desktop to it... Not sure if it would work or not.
https://www.makeuseof.com/tag/linux-desktop-windows-subsystem/

Again don't know if it would work or not...
 
Thanks for the quick reply.
WSL is a console only system, so that explains it.

I'll give the CLI version a try.

Cheers
 
My team uses WSL for loading software to Teensy. Did you know that you can call Windows executables from the WSL environment? The easiest path that we've found is calling the windows version of the teensy_loader_cli from WSL as part of our build process.
 
Status
Not open for further replies.
Back
Top