# Plexamp install error on rpi wrong ELF class: ELFCLASS64

**URL:** <https://forums.plex.tv/t/plexamp-install-error-on-rpi-wrong-elf-class-elfclass64/795327>\
**Category:** Plex Labs\
**Tags:** plexamp\
**Created:** [June 2, 2022, 6:07am UTC](https://forums.plex.tv/t/plexamp-install-error-on-rpi-wrong-elf-class-elfclass64/795327 "2022-06-02T06:07:19Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![euri10](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/euri10/32/229973_2.png) [@euri10](https://forums.plex.tv/u/euri10)\
**Post date:** [June 2, 2022, 6:07am UTC](https://forums.plex.tv/t/plexamp-install-error-on-rpi-wrong-elf-class-elfclass64/795327/1 "2022-06-02T06:07:20Z")

</div>

I’m using lts node installed with asdf, I tried with the raspian node version as well and ended up with same issue

```auto
pi@raspberrypi:~/plexamp $ node --version
v16.15.1

```

```auto
pi@raspberrypi:~/plexamp $ node js/index.js 
node:internal/modules/cjs/loader:1189
  return process.dlopen(module, path.toNamespacedPath(filename));
                 ^

Error: /home/pi/plexamp/treble/treble.node: wrong ELF class: ELFCLASS64
    at Object.Module._extensions..node (node:internal/modules/cjs/loader:1189:18)
    at Module.load (node:internal/modules/cjs/loader:981:32)
    at Function.Module._load (node:internal/modules/cjs/loader:822:12)
    at Module.require (node:internal/modules/cjs/loader:1005:19)
    at require (node:internal/modules/cjs/helpers:102:18)
    at Object.41673 (/home/pi/plexamp/js/index.js:2:332509)
    at a (/home/pi/plexamp/js/index.js:2:2015750)
    at Object.65631 (/home/pi/plexamp/js/index.js:2:327124)
    at a (/home/pi/plexamp/js/index.js:2:2015750)
    at Object.10546 (/home/pi/plexamp/js/index.js:2:316525) {
  code: 'ERR_DLOPEN_FAILED'
}

```

edit, adding uname info, seems like a 32/64 bit issue

```auto
pi@raspberrypi:~ $ uname -a
Linux raspberrypi 5.4.83-v7+ #1379 SMP Mon Dec 14 13:08:57 GMT 2020 armv7l GNU/Linux

```

```auto
pi@raspberrypi:~ $ sudo lshw
raspberrypi                 
    description: ARMv7 Processor rev 4 (v7l)
    product: Raspberry Pi 3 Model B Plus Rev 1.3
    serial: 00000000a1dfd957
    width: 32 bits
    capabilities: smp
  *-core
       description: Motherboard
       physical id: 0
     *-cpu:0
          description: CPU
          product: cpu
          physical id: 0
          bus info: cpu@0
          size: 1400MHz
          capacity: 1400MHz
          capabilities: half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt vfpd32 lpae evtstrm crc32 cpufreq
     *-cpu:1
          description: CPU
          product: cpu
          physical id: 1
          bus info: cpu@1
          size: 1400MHz
          capacity: 1400MHz
          capabilities: half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt vfpd32 lpae evtstrm crc32 cpufreq
     *-cpu:2
          description: CPU
          product: cpu
          physical id: 2
          bus info: cpu@2
          size: 1400MHz
          capacity: 1400MHz
          capabilities: half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt vfpd32 lpae evtstrm crc32 cpufreq
     *-cpu:3
          description: CPU
          product: cpu
          physical id: 3
          bus info: cpu@3
          size: 1400MHz
          capacity: 1400MHz
          capabilities: half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt vfpd32 lpae evtstrm crc32 cpufreq
     *-memory
          description: System memory
          physical id: 4
          size: 924MiB
  *-usbhost
       product: DWC OTG Controller
       vendor: Linux 5.4.83-v7+ dwc_otg_hcd
       physical id: 1
       bus info: usb@1
       logical name: usb1
       version: 5.04
       capabilities: usb-2.00
       configuration: driver=hub slots=1 speed=480Mbit/s
     *-usb
          description: USB hub
          product: USB 2.0 Hub
          vendor: Standard Microsystems Corp.
          physical id: 1
          bus info: usb@1:1
          version: b.b3
          capabilities: usb-2.00
          configuration: driver=hub maxpower=2mA slots=4 speed=480Mbit/s
        *-usb
             description: USB hub
             product: USB 2.0 Hub
             vendor: Standard Microsystems Corp.
             physical id: 1
             bus info: usb@1:1.1
             version: b.b3
             capabilities: usb-2.00
             configuration: driver=hub maxpower=2mA slots=3 speed=480Mbit/s
           *-usb
                description: Ethernet interface
                vendor: Standard Microsystems Corp.
                physical id: 1
                bus info: usb@1:1.1.1
                logical name: eth0
                version: 3.00
                serial: b8:27:eb:df:d9:57
                size: 1Gbit/s
                capacity: 1Gbit/s
                capabilities: usb-2.10 ethernet physical tp mii 10bt 10bt-fd 100bt 100bt-fd 1000bt-fd autonegotiation
                configuration: autonegotiation=on broadcast=yes driver=lan78xx duplex=full ip=192.168.1.13 link=yes maxpower=2mA multicast=yes port=MII speed=1Gbit/s
  *-network DISABLED
       description: Wireless interface
       physical id: 2
       logical name: wlan0
       serial: b8:27:eb:8a:8c:02
       capabilities: ethernet physical wireless
       configuration: broadcast=yes driver=brcmfmac driverversion=7.45.229 firmware=01-2dbd9d2e multicast=yes wireless=IEEE 802.11

```

---

<div class="post-metadata">

**Author:** ![Mitzsch](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/mitzsch/32/308163_2.png) [@Mitzsch](https://forums.plex.tv/u/Mitzsch)\
**Post date:** [June 2, 2022, 6:43am UTC](https://forums.plex.tv/t/plexamp-install-error-on-rpi-wrong-elf-class-elfclass64/795327/2 "2022-06-02T06:43:23Z")

</div>

Try again with a 64Bit Linux for your Pi. ([Operating system images – Raspberry Pi](https://www.raspberrypi.com/software/operating-systems/#raspberry-pi-os-64-bit))  
ELF class issues are likely happening due to running 64bit software on a 32bit os.

---

<div class="post-metadata">

**Author:** ![elan](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/elan/32/5_2.png) [@elan](https://forums.plex.tv/u/elan)\
**Post date:** [June 2, 2022, 6:56pm UTC](https://forums.plex.tv/t/plexamp-install-error-on-rpi-wrong-elf-class-elfclass64/795327/3 "2022-06-02T18:56:33Z")

</div>

also use node 12 which is the default with raspbian

---

<div class="post-metadata">

**Author:** ![euri10](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/euri10/32/229973_2.png) [@euri10](https://forums.plex.tv/u/euri10)\
**Post date:** [June 3, 2022, 12:17pm UTC](https://forums.plex.tv/t/plexamp-install-error-on-rpi-wrong-elf-class-elfclass64/795327/4 "2022-06-03T12:17:22Z")

</div>

ok now works fine on a 64 bit version, except that it is working only if started with the CLI

`lotso@raspberrypi:~/plexamp $ node js/index.js`

when I run it with my systemd service, as soon as I click on the rasperrypi link in plexamp to switch devices, the songs stops.

I recorded a movie that shows the behavior running from the cli then with  
[plexamp.tar.gz](https://forums.plex.tv/uploads/short-url/hazN7IGD4dXTL3kmI5AxbThSox1.gz) (6.4 MB)  
a service 🙂

on the movie the terminal is me ssh’ing in the rapsberry pi on the left, and plexamp running on my desktop on the right

I’m at a loss now since the service is exactly as if I was running the node command, I don’t get the difference, is there a way to get more logs ?

```auto
lotso@raspberrypi:~/plexamp $ cat /lib/systemd/system/plexamp.service 
[Unit]
Description=Plexamp
After=network.target

[Service]
Type=simple
User=lotso
WorkingDirectory=/home/lotso/plexamp
ExecStart=/usr/bin/node /home/lotso/plexamp/js/index.js
Restart=on-failure

[Install]
WantedBy=multi-user.target

```

---

<div class="post-metadata">

**Author:** ![euri10](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/euri10/32/229973_2.png) [@euri10](https://forums.plex.tv/u/euri10)\
**Post date:** [June 3, 2022, 4:14pm UTC](https://forums.plex.tv/t/plexamp-install-error-on-rpi-wrong-elf-class-elfclass64/795327/5 "2022-06-03T16:14:13Z")

</div>

I managed to reproduce the error seen in the movie above and have a log, can send it to whoever can look at it, I’d prefer not to post it here

---

<div class="post-metadata">

**Author:** ![pjv](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/pjv/32/4621_2.png) [@pjv](https://forums.plex.tv/u/pjv)\
**Post date:** [June 3, 2022, 5:29pm UTC](https://forums.plex.tv/t/plexamp-install-error-on-rpi-wrong-elf-class-elfclass64/795327/6 "2022-06-03T17:29:43Z")

</div>

Are you sure that you have node installed at /usr/bin/node?

Depending on how you installed it, it could be at a different location. When you are running it from the command line you are not specifying the full path so it could be anywhere that your user shell knows to look.

You can find out where it is located by typing `which node` on the command line.

---

<div class="post-metadata">

**Author:** ![euri10](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/euri10/32/229973_2.png) [@euri10](https://forums.plex.tv/u/euri10)\
**Post date:** [June 3, 2022, 5:32pm UTC](https://forums.plex.tv/t/plexamp-install-error-on-rpi-wrong-elf-class-elfclass64/795327/7 "2022-06-03T17:32:36Z")

</div>

Yup I doubled checked that

```auto
lotso@raspberrypi:~ $ which node
/usr/bin/node

```

the log given by the service is exactly the same as the one provided running directly with the cli

```auto
lotso@raspberrypi:~ $ sudo systemctl start plexamp
lotso@raspberrypi:~ $ sudo systemctl status plexamp.service 
● plexamp.service - Plexamp
     Loaded: loaded (/lib/systemd/system/plexamp.service; enabled; vendor preset: enabled)
     Active: active (running) since Fri 2022-06-03 19:31:39 CEST; 5s ago
   Main PID: 20000 (node)
      Tasks: 18 (limit: 780)
        CPU: 5.647s
     CGroup: /system.slice/plexamp.service
             └─20000 /usr/bin/node /home/lotso/plexamp/js/index.js

Jun 03 19:31:39 raspberrypi systemd[1]: Started Plexamp.
Jun 03 19:31:41 raspberrypi node[20000]: Starting Plexamp.
Jun 03 19:31:41 raspberrypi node[20000]: DEVICE: No provider for source f9f28887dd21937857764bed5595ac68518e2577

```

---

<div class="post-metadata">

**Author:** ![odinb1](https://avatars.discourse-cdn.com/v4/letter/o/ecccb3/32.png) [@odinb1](https://forums.plex.tv/u/odinb1)\
**Post date:** [June 3, 2022, 6:26pm UTC](https://forums.plex.tv/t/plexamp-install-error-on-rpi-wrong-elf-class-elfclass64/795327/8 "2022-06-03T18:26:19Z")

</div>

Use the bash-installer, and you should be good!  
Also, do not run it as a global service, run it as a user-service, that is what the installer-script does!

> [@PlexAmp-installer for Raspberry Pi with ARM64 HW](https://forums.plex.tv/t/plexamp-installer-for-raspberry-pi-with-arm64-hw/791982):
>
> Check github page for version currently installed using the script. Hi! Have created a bash for installing the Plexamp headless running on the Raspberry Pi! It does the full installation on a fresh setup of Raspbian OS 64-bit! Only thing you need is the post-login on web, and enabling of the service! Follow the guide here: …and let me know any issues/improvements/questions you might have! Have fun!

---

<div class="post-metadata">

**Author:** ![euri10](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/euri10/32/229973_2.png) [@euri10](https://forums.plex.tv/u/euri10)\
**Post date:** [June 3, 2022, 6:58pm UTC](https://forums.plex.tv/t/plexamp-install-error-on-rpi-wrong-elf-class-elfclass64/795327/9 "2022-06-03T18:58:20Z")

</div>

ok very interesting, and thanks for getting me on track @odinb1 , moving the service as a user fixed it for me, I was originaly putting it as a system service reading [Plexamp on the Raspberry Pi](https://forums.plex.tv/t/plexamp-on-the-raspberry-pi/791500)

I’d be interested to get why it works this way and fails the other though, but I’m happy now 🙂

---

<div class="post-metadata">

**Author:** ![odinb1](https://avatars.discourse-cdn.com/v4/letter/o/ecccb3/32.png) [@odinb1](https://forums.plex.tv/u/odinb1)\
**Post date:** [June 3, 2022, 9:34pm UTC](https://forums.plex.tv/t/plexamp-install-error-on-rpi-wrong-elf-class-elfclass64/795327/10 "2022-06-03T21:34:30Z")

</div>

Yeah, it failed for me also on the initial betas, but then when I ran it as a user-service, it worked! Since it is a user-application this makes sense to also run it as that user!

---

<div class="post-metadata">

**Author:** ![vinnigrylls](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/vinnigrylls/32/15055_2.png) [@vinnigrylls](https://forums.plex.tv/u/vinnigrylls)\
**Post date:** [June 4, 2022, 12:28am UTC](https://forums.plex.tv/t/plexamp-install-error-on-rpi-wrong-elf-class-elfclass64/795327/11 "2022-06-04T00:28:27Z")

</div>

I was having trouble getting the service to restart on reboot, this appears to have solved the problem. Thanks pjv!

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/plex/original/3X/2/a/2acb9765406f63293d357b4ec509ec39aa28f2ad.png) [@system](https://forums.plex.tv/u/system)\
**Post date:** [September 2, 2022, 12:28am UTC](https://forums.plex.tv/t/plexamp-install-error-on-rpi-wrong-elf-class-elfclass64/795327/12 "2022-09-02T00:28:56Z")

</div>

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.
