0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

WSL1のUbuntu 24.04 - apt upgradeがdpkg, systemd, polkitdの語句を含むエラーで進まない

Last updated at Posted at 2025-02-05

[問題点] WSL1のUbuntu 24.04にて、アップグレード時にエラーが出て、先へ進まなくなった

$ sudo apt upgrade
      ... 
 dpkg, systemd, polkitdなどの語句を含むエラーメッセージ
 (upgradeが行われずに終了)

(エラーの例)
Failed to take /etc/passwd lock: Invalid argument
dpkg: error processing package systemd (--configure):
 installed systemd package post-installation script subprocess returned error exit status 1
Errors were encountered while processing:
 systemd
E: Sub-process /usr/bin/dpkg returned an error code (1)

[解決] 下記コマンドを(wslの)ターミナルにて打ち込んだところ、その後は問題無くアップグレードできるようになった

cd /bin && sudo mv -f systemd-sysusers{,.org} && sudo ln -s echo systemd-sysusers && cd -

下記サイトの情報そのままなのですが、あまりにも即効性があったので、メモ代わりに記載します。
(Windows 11, wsl1, 2台で確認しています。うち1台はarm版 parallels desktop)
https://think-t.hatenablog.com/entry/2025/01/25/141248

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?