journalctl 出现“不支持的功能”错误。

一个简单的journalctl命令现在给我返回这个错误。
Journal file /var/log/journal/ad9213e031ec2a16399a42515988884e/user-1001@ae426ac82df44a8489f745ad63e8c9ea-000000000000215f-0005848bb1ab0334.journal uses an unsupported feature, ignoring file.
Use SYSTEMD_LOG_LEVEL=debug journalctl --file=/var/log/journal/ad9213e031ec2a16399a42515988884e/user-1001@ae426ac82df44a8489f745ad63e8c9ea-000000000000215f-0005848bb1ab0334.journal to see the details.
-- No entries --

当我调用推荐的命令 SYSTEMD_LOG_LEVEL=debug journalctl --file=/var/log/journal/ad9213e031ec2a16399a42515988884e/user-1001@ae426ac82df44a8489f745ad63e8c9ea-000000000000215f-0005848bb1ab0334.journal 时,我得到结果。
Journal effective settings seal=no compress=no compress_threshold_bytes=8B
Journal file /var/log/journal/ad9213e031ec2a16399a42515988884e/user-1001@ae426ac82df44a8489f745ad63e8c9ea-000000000000215f-0005848bb1ab0334.journal uses incompatible flag lz4-compressed disabled at compilation time.
Failed to open journal file /var/log/journal/ad9213e031ec2a16399a42515988884e/user-1001@ae426ac82df44a8489f745ad63e8c9ea-000000000000215f-0005848bb1ab0334.journal: Protocol not supported
mmap cache statistics: 0 hit, 1 miss
Failed to open files: Protocol not supported

journalctl --version 给出的结果是:

systemd 244 (244)
-PAM -AUDIT -SELINUX +IMA -APPARMOR +SMACK +SYSVINIT +UTMP -LIBCRYPTSETUP -GCRYPT -GNUTLS -ACL +XZ -LZ4 -SECCOMP +BLKID -ELFUTILS -KMOD -IDN2 -IDN -PCRE2 default-hierarchy=unified

看起来有个使用相同版本的redhat用户遇到了同样的问题
1个回答

我应该注意到我在问题中写的错误,但是作为Ubuntu错误跟踪器上宽容的管理员指出,systemd版本244超过了Ubuntu 18.04的版本237。原来homebrew安装了自己的systemd和journalctl用于某些软件包,并且最近的升级引入了错误。新的journalctl无法读取使用lz4压缩的日志,而这是Ubuntu的默认设置。要启用此功能,journalctl需要使用标志-Dlz4=true进行构建。我向homebrew提交了一个补丁,现在它可以正常工作了。