首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >安装导航码抛出“单元navidrome.service未正确加载: Exec格式错误。”

安装导航码抛出“单元navidrome.service未正确加载: Exec格式错误。”
EN

Stack Overflow用户
提问于 2021-03-16 10:27:32
回答 1查看 346关注 0票数 1

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

代码语言:javascript
复制
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.

navidrome.service的内容如下:

navidrome.service

代码语言:javascript
复制
[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"

为什么我要得到错误,以及如何修复它?

EN

回答 1

Stack Overflow用户

发布于 2022-08-29 09:56:35

当我试图使用navidrome_0.47.5_Linux_arm64.tar.gz.启动raspberry pi 3上的服务时,我也犯了同样的错误。当我用来自navidrome_0.47.5_Linux_armv7.tar.gz,的文件替换它时,一切都很好。您可能试图使用错误的架构运行可执行文件。

我还认为,用户和组应该包含您在这里选择的实际用户和组:

代码语言:javascript
复制
sudo install -d -o <user> -g <group> /opt/navidrome
sudo install -d -o <user> -g <group> /var/lib/navidrome
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/66653332

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档