0

我有一个问题,我不知道去哪里寻找问题。我正在运行 debian:buster 并且正在尝试将其设置为 jellyfin 服务器。

我添加了必要的架构(amd64)。

user@server:~$ sudo dpkg --print-architecture
i386
user@server:~$ sudo dpkg --print-foreign-architectures
amd64
arm64

我根据 linuxserver.io/jellyfin 文档中的示例创建了一个 docker-compose 文件。

version: "2"
services:
  jellyfin:
    image: linuxserver/jellyfin:amd64-latest
    container_name: jellyfin
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=America/Chicago
      - UMASK_SET=022 #optional
    volumes:
      - /srv/jellyfin/cache/
      - /srv/jellyfin/config/
      - /media/nasdisk1/series/
      - /media/nasdisk1/films/
      - /media/nasdisk2/muziek/
    ports:
      - 8096:8096
      - 8920:8920
    restart: unless-stopped

当我这样做时sudo docker-compose up,容器正在尝试重新启动并且容器的日志显示:

standard_init_linux.go:207: exec user process caused "exec format error"

当我查看守护程序的日志时,它具有以下内容:

Jan  3 10:04:54 server systemd-udevd[10726]: link_config: autonegotiation is unset or enabled, the speed and duplex are not writable.
Jan  3 10:04:54 server systemd-udevd[10726]: Could not generate persistent MAC address for veth27501f9: No such file or directory
Jan  3 10:04:54 server systemd-udevd[10409]: link_config: autonegotiation is unset or enabled, the speed and duplex are not writable.
Jan  3 10:04:54 server systemd-udevd[10409]: Could not generate persistent MAC address for vethf2645f0: No such file or directory
Jan  3 10:04:54 server dockerd[835]: time="2021-01-03T10:04:54.762831765+01:00" level=info msg="shim docker-containerd-shim started" address=/containerd-shim/moby/aac362ac93e9e49bd98e1ae5e5677f36b7622f01467d97be972801fff6e55fa2/shim.sock debug=false pid=11392
Jan  3 10:04:54 server systemd[766]: tmp-runc.Jzl4EG.mount: Succeeded.
Jan  3 10:04:54 server systemd[1255]: tmp-runc.Jzl4EG.mount: Succeeded.
Jan  3 10:04:54 server systemd[1]: tmp-runc.Jzl4EG.mount: Succeeded.
Jan  3 10:04:55 server dockerd[835]: time="2021-01-03T10:04:55.369653723+01:00" level=info msg="shim reaped" id=aac362ac93e9e49bd98e1ae5e5677f36b7622f01467d97be972801fff6e55fa2
Jan  3 10:04:55 server dockerd[835]: time="2021-01-03T10:04:55.380208387+01:00" level=info msg="ignoring event" module=libcontainerd namespace=moby topic=/tasks/delete type="*events.TaskDelete"
Jan  3 10:04:55 server systemd-udevd[10726]: link_config: autonegotiation is unset or enabled, the speed and duplex are not writable.
Jan  3 10:04:55 server systemd[1255]: run-docker-netns-bb13291a727b.mount: Succeeded.
Jan  3 10:04:55 server systemd[766]: run-docker-netns-bb13291a727b.mount: Succeeded.
Jan  3 10:04:55 server systemd[1]: run-docker-netns-bb13291a727b.mount: Succeeded.
Jan  3 10:04:55 server systemd[766]: var-lib-docker-containers-aac362ac93e9e49bd98e1ae5e5677f36b7622f01467d97be972801fff6e55fa2-mounts-shm.mount: Succeeded.
Jan  3 10:04:55 server systemd[1]: var-lib-docker-containers-aac362ac93e9e49bd98e1ae5e5677f36b7622f01467d97be972801fff6e55fa2-mounts-shm.mount: Succeeded.
Jan  3 10:04:55 server systemd[1255]: var-lib-docker-containers-aac362ac93e9e49bd98e1ae5e5677f36b7622f01467d97be972801fff6e55fa2-mounts-shm.mount: Succeeded.
Jan  3 10:04:55 server systemd[1]: var-lib-docker-overlay2-9fed81476b3c95a4437492d16744fe31d376aff8b329166b1e4fa6a34f6b9410-merged.mount: Succeeded.
Jan  3 10:04:55 server systemd[1255]: var-lib-docker-overlay2-9fed81476b3c95a4437492d16744fe31d376aff8b329166b1e4fa6a34f6b9410-merged.mount: Succeeded.
Jan  3 10:04:55 server systemd[766]: var-lib-docker-overlay2-9fed81476b3c95a4437492d16744fe31d376aff8b329166b1e4fa6a34f6b9410-merged.mount: Succeeded.
Jan  3 10:04:56 server avahi-daemon[610]: Interface br-d72bd039829d.IPv6 no longer relevant for mDNS.
Jan  3 10:04:56 server avahi-daemon[610]: Leaving mDNS multicast group on interface br-d72bd039829d.IPv6 with address fe80::42:eaff:fede:4bc1.
Jan  3 10:04:56 server avahi-daemon[610]: Interface br-d72bd039829d.IPv4 no longer relevant for mDNS.
Jan  3 10:04:56 server avahi-daemon[610]: Leaving mDNS multicast group on interface br-d72bd039829d.IPv4 with address 172.19.0.1.
Jan  3 10:04:56 server avahi-daemon[610]: Withdrawing address record for fe80::42:eaff:fede:4bc1 on br-d72bd039829d.
Jan  3 10:04:56 server avahi-daemon[610]: Withdrawing address record for 172.19.0.1 on br-d72bd039829d.
Jan  3 10:04:56 server dbus-daemon[598]: [system] Activating via systemd: service name='org.freedesktop.nm_dispatcher' unit='dbus-org.freedesktop.nm-dispatcher.service' requested by ':1.8' (uid=0 pid=600 comm="/usr/sbin/NetworkManager --no-daemon ")
Jan  3 10:04:56 server systemd[1]: Starting Network Manager Script Dispatcher Service...
Jan  3 10:04:56 server dbus-daemon[598]: [system] Successfully activated service 'org.freedesktop.nm_dispatcher'
Jan  3 10:04:56 server systemd[1]: Started Network Manager Script Dispatcher Service.
Jan  3 10:04:56 server nm-dispatcher: req:1 'down' [br-d72bd039829d]: new request (1 scripts)
Jan  3 10:04:56 server nm-dispatcher: req:1 'down' [br-d72bd039829d]: start running ordered scripts...

我在网上看到有人说它与架构有关,我也看到有人建议它与 dockerfiles 中的入口点有关。我已经尝试过使用谷歌搜索,但我缺少有效执行此操作的必要参考框架。

这里出了什么问题?

4

1 回答 1

0

我通过询问一些聪明人找到了答案。

错误“执行格式错误”几乎总是指不支持的架构或其他问题。

使用 dpkg 查看架构不是正确的方法。它显示了允许使用哪些架构安装的软件包。不是主机 cpu 架构。

sudo dpkg --print-architecture
i386
user@server:~$ sudo dpkg --print-foreign-architectures
amd64
arm64

arch命令显示主机 cpu 架构。

arch
i686

问题是 i686 是 32 位架构,而 jellyfin 和 linux 服务器只支持 64 位架构。我偶然在我的系统上安装了 32 位 debian,而不是 64 位。

于 2021-01-05T10:21:35.517 回答