无法在 chroot 环境中配置 systemd?

无法在 chroot 环境中配置 systemd?

在文件夹内进行 chroot 并进行一些其他调整后,我最终用以下内容更新了软件包:

apt update 

但它显示:

    Setting up systemd (245.5-3) ...
    Detected unsafe path transition /var/log → /var/log/journal during 
    canonicalization of /var/log/journal.
    Detected unsafe path transition /var/log → /var/log/journal during 
    canonicalization of /var/log/journal.
    Detected unsafe path transition /var/log → /var/log/journal during canonicalization of /var/log/journal.
    dpkg: error processing package systemd (--configure):
     installed systemd package post-installation script subprocess returned error exit status 73
    dpkg: dependency problems prevent configuration of libpam-systemd:armhf:
    libpam-systemd:armhf depends on systemd (= 245.5-3); however:
    Package systemd is not configured yet.

    dpkg: error processing package libpam-systemd:armhf (--configure):
    dependency problems - leaving unconfigured
    Errors were encountered while processing:
    systemd
 libpam-systemd:armhf
E: Sub-process /usr/bin/dpkg returned an error code (1)

我应该做什么来解决这个问题?我使用 Raspbian 作为主机操作系统。

答案1

日志显示存在不安全的路径转换。发生这种情况是因为目标目录是用户拥有的。您应该 chroot 到root-owned 目录。

相关内容