How to install Software via SSH

  • Hello,

    I just installed LibreELEC 9.2.3 (Kodi V 18.7) on my Raspberry Pi 3 b+.

    To power up the Pi I want to use this switch from PiSupply because I dont want to unplug and plug again the usb power cable. With this switch I just have to push a button on the case to boot/power down LibreELEC.

    But this switch needs software to work propperly. I tried to install it using SSH because it seems like there is no terminal avaiable in LibreELEC. UnfortunalIy get the following error:


    I removed "sudo" from the command because I am already root when I use SSH.

    So I cannot install the software using curl -sSL. Is there any other way installing the software? I don´t know if I can just use another commant instead of curls -sSL or apt-get (even though I didn´t used apt-get, it is listet in the error log) or if I can edit some files on the SD Card (I am really new to both linux and libreELEC). Or can I install the software using the addons in Kodi?


    In case there is no way installing the software, are there any other ways to boot the RasPi with a button? I know, a switch would be much easier, but I dont want to flip it anytime I powered off the system to cut the power circuit.


    Thank you for your help :)

  • LE uses it's own add-on system to install packages. APT is not supported. Fortunately you don't need APT or an install script for this project.

    • install the "Raspberry Pi Tools" add-on (provides Python GPIO lib)
    • create the folder /storage/.kodi/userdata/scripts
    • insert this lines between line 4 and 5 of softshut.py:
    Code
    1. import sys
    2. sys.path.append('/storage/.kodi/addons/virtual.rpi-tools/lib')
    • put softshut.py into /storage/.kodi/userdata/scripts
    • create /storage/.config/autostart.sh with this content:
    Shell-Script
    1. #!/bin/sh
    2. (
    3. python /storage/.kodi/userdata/scripts/softshut.py
    4. ) &

    Flexin' vinyl, jammin' break beats. 8)

  • Thank you again for your help. It worked! Unfortunaly the Pi switches off within 2 minutes, but thats a known issue. I am going to try the workaround provided by Pi Supply.