安装 navidrome 抛出"Unit navidrome.service is not loaded properly: Exec format error."



在安装导航场时,我收到以下错误:

hardik:/etc/systemd/system$ sudo systemctl start navidrome.service
Failed to start navidrome.service: Unit navidrome.service is not loaded properly: Exec format error.
See system logs and 'systemctl status navidrome.service' for details.

机场服务的内容如下:-

机场服务

[Unit]
Description=Navidrome Music Server and Streamer compatible with Subsonic/Airsonic
After=remote-fs.target network.target
AssertPathExists=/var/lib/navidrome
[Install]
WantedBy=multi-user.target
[Service]
User=<user>
Group=<group>
Type=simple
ExecStart=/opt/navidrome/navidrome --configfile "/var/lib/navidrome/navidrome.toml"
WorkingDirectory=/var/lib/navidrome
TimeoutStopSec=20
KillMode=process
Restart=on-failure
# See https://www.freedesktop.org/software/systemd/man/systemd.exec.html
DevicePolicy=closed
NoNewPrivileges=yes
PrivateTmp=yes
PrivateUsers=yes
ProtectControlGroups=yes
ProtectKernelModules=yes
ProtectKernelTunables=yes
RestrictAddressFamilies=AF_UNIX AF_INET AF_INET6
RestrictNamespaces=yes
RestrictRealtime=yes
SystemCallFilter=~@clock @debug @module @mount @obsolete @reboot @setuid @swap
ReadWritePaths=/var/lib/navidrome
# You can uncomment the following line if you're not using the jukebox This
# will prevent navidrome from accessing any real (physical) devices
#PrivateDevices=yes
# You can change the following line to `strict` instead of `full` if you don't
# want navidrome to be able to write anything on your filesystem outside of
# /var/lib/navidrome.
ProtectSystem=full
# You can uncomment the following line if you don't have any media in /home/*.
# This will prevent navidrome from ever reading/writing anything there.
#ProtectHome=true
# You can customize some Navidrome config options by setting environment variables here. Ex:
#Environment=ND_BASEURL="/navidrome"

我为什么会出现错误,如何修复?

当我试图使用navidrome_0.47.5_Linux_arm64.tar.gz在我的树莓派3上启动服务时,我遇到了同样的错误。当我用navidrome_00.47.5_Linux-armv7.tar.gz中的文件替换它时,一切都很好。很可能您试图用错误的体系结构运行可执行文件。

此外,我认为用户和组应该包含您在此处选择的实际用户和组:

sudo install -d -o <user> -g <group> /opt/navidrome
sudo install -d -o <user> -g <group> /var/lib/navidrome

相关内容

最新更新