Description
Version
Microsoft Windows [Version 10.0.22000.978]
WSL Version
- WSL 2WSL 1
Kernel Version
Linux 4.4.0-22000-Microsoft
Distro Version
Debian Bookworm
Other Software
No response
Repro Steps
- Start with an install of Debian Bullseye
- (attempt to) upgrade to Debian Bookworm
Expected Behavior
All system-critical/essential/default packages should upgrade correctly.
Actual Behavior
The installation of usrmerge fails. This bug effectively breaks the entire install of Debian Bookworm on
WSL 1.0, because usrmerge is now a required dependency of the
essential/system-critical package init-system-helpers, as of version
1.65~exp1 through the current version (1.65.2) of that package.
Diagnostic Logs
Setting up usrmerge (31) ...
mv: cannot move '/lib/x86_64-linux-gnu/security' to
'/usr/lib/x86_64-linux-gnu/security': Permission denied
FATAL ERROR:
mv --no-clobber /lib/x86_64-linux-gnu/security
/usr/lib/x86_64-linux-gnu/security: rc=1
You can try correcting the errors reported and running again
/usr/lib/usrmerge/convert-usrmerge until it will complete without errors.
Do not install or update other Debian packages until the program
has been run successfully.
E: usrmerge failed.
dpkg: error processing package usrmerge (--configure):
installed usrmerge package post-installation script subprocess
returned error exit status 1
Errors were encountered while processing:
usrmerge
E: Sub-process /usr/bin/dpkg returned an error code (1)
Activity
seanthegeek commentedon Sep 30, 2022
Debian bug report https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1020971
seanthegeek commentedon Oct 1, 2022
Debian bug closed with this note
bluca commentedon Oct 2, 2022
A new upload to the store has been done by the maintainer, and the Debian image is now merged-usr by default. Users on WSL 1.0 can uninstall and reinstall to fix this problem.
firewave commentedon Oct 21, 2022
This also applies to Kali Linux which is based on Debian:
It just broke with the latest updates from last night though.
firewave commentedon Nov 10, 2022
The WSL1 Kali Linux now changed to
firewave commentedon Dec 29, 2022
I was able to bypass the
libsystemd-shared-251.soissue by re-adding the older files to the system and getting past that.Then I ran into the issue that files exist in
/lib/x86_64-linux-gnuand/usr/lib/x86_64-linux-gnuwhich I was able resolve by getting rid of the ones in/usr/lib.That got me back to the initial issue.
It is extremely weird since it was able to copy/move several files between those folders already. There's no
securityfolder in/usr/lib/x86_64-linux-gnuyet.firewave commentedon Jan 6, 2023
I was able to work around the issue by doing
That leads to a different error:
Running
/usr/lib/usrmerge/convert-usrmergeagain doesn't report that error anymore and was able to finish.After that I was finally able to update the system again.
It did report the following though:
That suggests to run
dpkg-fsys-usrunmesswhich seems to have cleaned everything up.bluca commentedon Jan 9, 2023
No, that further breaks it, it means you won't be able to upgrade to bookworm. Delete the image and install it from scratch.
Biswa96 commentedon Jan 9, 2023
Is it possible to use the Linux distribution in WSL2 instead of WSL1?
firewave commentedon Jan 9, 2023
I am using Kali which is rolling so I am possibly already on a bookworm-ish state.
Vebryn commentedon Jun 24, 2023
Still not working, I remove my Debian image using wsl unregister then uninstall it from start menu. Then, I download new image from https://aka.ms/wsl-debian-gnulinux.
I got a fresh Debian 11. After editing sources.list and upgrade:
seanthegeek commentedon Jul 1, 2023
Not in some cases. WSL2 requires Hyper-V. Some Virtual desktop systems like AWS WorkSpaces can't run a hypervisor like Hyper-V, because the system itself is a VM.
zhangboyang commentedon Dec 8, 2023
Here is a pure WSL1 workaround: #4279 (comment)
microsoft-github-policy-service commentedon Dec 12, 2024
This issue has been automatically closed since it has not had any activity for the past year. If you're still experiencing this issue please re-file this as a new issue or feature request.
Thank you!