Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WSL1/2] Import error due to hard links #4457

Closed
nunix opened this issue Aug 30, 2019 · 18 comments
Closed

[WSL1/2] Import error due to hard links #4457

nunix opened this issue Aug 30, 2019 · 18 comments

Comments

@nunix
Copy link

nunix commented Aug 30, 2019

Important: Do not open GitHub issues for Windows crashes (BSODs) or security issues. Please direct all Windows crashes and security issues to secure@microsoft.com. Ideally, please configure your machine to capture minidumps, repro the issue, and send the minidump from "C:\Windows\minidump".

Please fill out the below information:

  • Your Windows build number: (Type ver at a Windows Command Prompt)

  • What you're doing and what's happening: (Copy&paste the full set of specific command-line steps necessary to reproduce the behavior, and their output. Include screen shots if that helps demonstrate the problem.)
    Version 1803 build 18970

  • What's wrong / what should be happening instead:
    When loading Clearlinux rootfs.tar on WSL 1 and 2, it ends abruptly with unexpected error instead of loading the distro.

  • For WSL launch issues, please collect detailed logs.
    wslcl.zip

Attached are the 3 log files, and here is a sample of the error:
sbin: Hard-link target 'bin' does not exist.
usr/bin/b2sum: Hard-link target 'usr/bin/[' does not exist.
usr/bin/base32: Hard-link target 'usr/bin/[' does not exist.
usr/bin/base64: Hard-link target 'usr/bin/[' does not exist.
usr/bin/basename: Hard-link target 'usr/bin/[' does not exist.
usr/bin/basenc: Hard-link target 'usr/bin/[' does not exist.
usr/bin/bzcat: Hard-link target 'usr/bin/bunzip2' does not exist.
usr/bin/bzfgrep: Hard-link target 'usr/bin/bzegrep' does not exist.

the hard links come from the fact that Clearlinux uses coreutils in the default bundle os-core
While the executables can be copied instead of the hard links, the libraries have the same setup (/lib points to /usr/lib).

I do have Clearlinux in WSL1 since the build 18305, but even if I export and import it again, it will also fail.

Thanks in advance for your help :)

WSL Corsair

@nunix
Copy link
Author

nunix commented Aug 30, 2019

additional testing:
I just run untar from WSL to a temp rootfs V1 (i.e. c:\mydistro\rootfs) and made a V1 distro (i.e. alpine) point to the Clearlinux path via the variable BasePath in regedit.
Clearlinux launches perfectly.

I really think, somehow, the issue is with tar.exe which, I only suppose, is called from wsl.exe import function.

@Biswa96
Copy link

Biswa96 commented Aug 31, 2019

There is no tar.exe thingy. I've also seen this issue but can't find which is responsible. If you're using the docker image of clearlinux it is in .TAR.XZ format. So in a WSL distro, extract it in a temp dir and re-compress it to .TAR.GZ. More here.

@nunix
Copy link
Author

nunix commented Aug 31, 2019

thanks for the feedback and actually I do it a bit differently (do not pass by tar.xz to tar.gz at all):

docker run -it --name wslclear clearlinux
swupd update # and I normally add some other basic bundles from docker image
exit
docker export -o wslclear.tar wslclear
wsl.exe --import wslclear ./wslclear ./wslclear.tar

Something like that is my default distro creation :)
Now back to the error, it might be actually linked to #4102 so this issue could be a duplicate (so please feel free to close it and I will follow the initial one)

Finally, by tar.exe (and you're totally right it doesn't exist), I meant the bsdtar used during --import.
Actually, if I use 7zip to untar in a Windows FS, I will also get the errors about the hard links.

I'll make more tests in the meantime, and hopefully a solution is near :)

@danthe1st
Copy link

Is there any update to this? I have the same problem.

@jindong-pan
Copy link

Make sure you open terminal as administer, otherwise you will not able to import properly. :)

@therealkenc
Copy link
Collaborator

Neither this issue nor #4909 have CLI repro steps to exhibit 'Hard-link target does not exist', which would give this issue hope if not resolution.

@haakoo
Copy link

haakoo commented Jun 21, 2020

I'm getting this same error now, after "GA".

PS C:\Users\haako> wsl --set-version Ubuntu 2
Conversion in progress, this may take a few minutes...
For information on key differences with WSL 2 please visit https://aka.ms/wsl2
Importing the distribution failed.
./home/haakoo/gems/doc/test-unit-3.3.3/rdoc/js/jquery.js: Hard-link target './home/haakoo/gems/doc/tzinfo-2.0.0/rdoc/js/jquery.js' does not exist.
./home/haakoo/gems/doc/test-unit-3.3.3/rdoc/fonts/Lato-Light.ttf: Hard-link target './home/haakoo/gems/doc/tzinfo-2.0.0/rdoc/fonts/Lato-Light.ttf' does not exist.
./home/haakoo/gems/doc/test-unit-3.3.3/rdoc/fonts/Lato-LightItalic.ttf: Hard-link target './home/haakoo/gems/doc/tzinfo-2.0.0/rdoc/fonts/Lato-LightItalic.ttf' does not exist.
./home/haakoo/gems/doc/test-unit-3.3.3/rdoc/fonts/Lato-Regular.ttf: Hard-link target './home/haakoo/gems/doc/tzinfo-2.0.0/rdoc/fonts/Lato-Regular.ttf' does not exist.
./home/haakoo/gems/doc/test-unit-3.3.3/rdoc/fonts/Lato-RegularItalic.ttf: Hard-link target './home/haakoo/gems/doc/tzinfo-2.0.0/rdoc/fonts/Lato-RegularItalic.ttf' does not exist.
./home/haakoo/gems/doc/stringio-0.0.2/rdoc/js/jquery.js: Hard-link target './home/haakoo/gems/doc/tzinfo-2.0.0/rdoc/js/jquery.js' does not exist.
./home/haakoo/gems/doc/stringio-0.0.2/rdoc/fonts/Lato-Light.ttf: Hard-link target './home/haakoo/gems/doc/tzinfo-2.0.0/rdoc/fonts/Lato-Light.ttf' does not exist.
./home/haakoo/gems/doc/stringio-0.0.2/rdoc/fonts/Lato-LightItalic.ttf: Hard-link target './home/haakoo/gems/doc/tzinfo-2.0.0/rdoc/fonts/Lato-LightItalic.ttf' does not exist.
./home/haakoo/gems/doc/stringio-0.0.2/rdoc/fonts/Lato-Regular.ttf: Hard-link target './home/haakoo/gems/doc/tzinfo-2.0.0/rdoc/fonts/Lato-Regular.ttf' does not exist.
./home/haakoo/gems/doc/stringio-0.0.2/rdoc/fonts/Lato-RegularItalic.ttf: Hard-link target './home/haakoo/gems/doc/tzinfo-2.0.0/rdoc/fonts/Lato-RegularItalic.ttf' does not exist.
./home/haakoo/gems/doc/rdoc-6.1.1/rdoc/js/jquery.js: Hard-link target './home/haakoo/gems/doc/tzinfo-2.0.0/rdoc/js/jquery.js' does not exist.
./home/haakoo/gems/doc/rdoc-6.1.1/rdoc/fonts/Lato-Light.ttf: Hard-link target './home/haakoo/gems/doc/tzinfo-2.0.0/rdoc/fonts/Lato-Light.ttf' does not exist.
./home/haakoo/gems/doc/rdoc-6.1.1/rdoc/fonts/Lato-LightItalic.ttf: Hard-link target './home/haakoo/gems/doc/tzinfo-2.0.0/rdoc/fonts/Lato-LightItalic.ttf' does not exist.
./home/haakoo/gems/doc/rdoc-6.1.1/rdoc/fonts/Lato-Regular.ttf: Hard-link target './home/haakoo/gems/doc/tzinfo-2.0.0/rdoc/fonts/Lato-Regular.ttf' does not exist.
./home/haakoo/gems/doc/rdoc-6.1.1/rdoc/fonts/Lato-RegularItalic.ttf: Hard-link target './home/haakoo/gems/doc/tzinfo-2.0.0/rdoc/fonts/Lato-RegularItalic.ttf' does not exist.
./home/haakoo/gems/doc/rake-12.3.2/rdoc/js/jquery.js: Hard-link target './home/haakoo/gems/doc/tzinfo-2.0.0/rdoc/js/jquery.js' does not exist.
./home/haakoo/gems/doc/rake-12.3.2/rdoc/fonts/Lato-Light.ttf: Hard-link target './home/haakoo/gems/doc/tzinfo-2.0.0/rdoc/fonts/Lato-Light.ttf' does not exist.
./home/haakoo/gems/doc/rake-12.3.2/rdoc/fonts/Lato-LightItalic.ttf: Hard-link target './home/haakoo/gems/doc/tzinfo-2.0.0/rdoc/fonts/Lato-LightItalic.ttf' does not exist.
./home/haakoo/gems/doc/rake-12.3.2/rdoc/fonts/Lato-Regular.ttf: Hard-link target './home/haakoo/gems/doc/tzinfo-2.0.0/rdoc/fonts/Lato-Regular.ttf' does not exist.
./home/haakoo/gems/doc/rake-12.3.2/rdoc/fonts/Lato-RegularItalic.ttf: Hard-link target './home/haakoo/gems/doc/tzinfo-2.0.0/rdoc/fonts/Lato-RegularItalic.ttf' does not exist.
./home/haakoo/gems/doc/psych-3.1.0/rdoc/js/jquery.js: Hard-link target './home/haakoo/gems/doc/tzinfo-2.0.0/rdoc/js/jquery.js' does not exist.
./home/haakoo/gems/doc/psych-3.1.0/rdoc/fonts/Lato-Light.ttf: Hard-link target './home/haakoo/gems/doc/tzinfo-2.0.0/rdoc/fonts/Lato-Light.ttf' does not exist.
./home/haakoo/gems/doc/psych-3.1.0/rdoc/fonts/Lato-LightItalic.ttf: Hard-link target './home/haakoo/gems/doc/tzinfo-2.0.0/rdoc/fonts/Lato-LightItalic.ttf' does not exist.
./home/haakoo/gems/doc/psych-3.1.0/rdoc/fonts/Lato-Regular.ttf: Hard-link target './home/haakoo/gems/doc/tzinfo-2.0.0/rdoc/fonts/Lato-Regular.ttf' does not exist.
./home/haakoo/gems/doc/psych-3.1.0/rdoc/fonts/Lato-RegularItalic.ttf: Hard-link target './home/haakoo/gems/doc/tzinfo-2.0.0/rdoc/fonts/Lato-RegularItalic.ttf' does not exist.
./home/haakoo/gems/doc/power_assert-1.1.4/rdoc/js/jquery.js
PS C:\Users\haako>

Any ideas, or should I just delete it and start over fresh? Any steps I can do to get better debug data?

@happiness801
Copy link

@haakoo : I got very similar errors also all in /rdoc related to Ruby.

C:\Users\kgwynn>wsl --set-version Ubuntu 2
Conversion in progress, this may take a few minutes...
For information on key differences with WSL 2 please visit https://aka.ms/wsl2
Importing the distribution failed.
./usr/lib/ruby/2.5.0/rdoc/generator/template/darkfish/js/jquery.js: Hard-link target './var/lib/gems/2.5.0/doc/rubygems-update-3.1.2/rdoc/js/jquery.js' does not exist.
./usr/lib/ruby/2.5.0/rdoc/generator/template/darkfish/fonts/Lato-Light.ttf: Hard-link target './var/lib/gems/2.5.0/doc/rubygems-update-3.1.2/rdoc/fonts/Lato-Light.ttf' does not exist.
./usr/lib/ruby/2.5.0/rdoc/generator/template/darkfish/fonts/Lato-LightItalic.ttf: Hard-link target './var/lib/gems/2.5.0/doc/rubygems-update-3.1.2/rdoc/fonts/Lato-LightItalic.ttf' does not exist.
./usr/lib/ruby/2.5.0/rdoc/generator/template/darkfish/fonts/Lato-Regular.ttf: Hard-link target './var/lib/gems/2.5.0/doc/rubygems-update-3.1.2/rdoc/fonts/Lato-Regular.ttf' does not exist.
./usr/lib/ruby/2.5.0/rdoc/generator/template/darkfish/fonts/Lato-RegularItalic.ttf: Hard-link target './var/lib/gems/2.5.0/doc/rubygems-update-3.1.2/rdoc/fonts/Lato-RegularItalic.ttf' does not exist.
bsdtar: Error exit delayed from previous errors.

Logging into WSL to remove ruby manually and trying again... WORKED FOR ME

@ckhordiasma
Copy link

ckhordiasma commented Sep 14, 2020

Importing the distribution failed.
./var/lib/gems/2.5.0/doc/rdoc-6.0.4/rdoc/js/jquery.js: Hard-link target './var/lib/gems/2.5.0/doc/test-unit-3.2.8/rdoc/js/jquery.js' does not exist.
./var/lib/gems/2.5.0/doc/rdoc-6.0.4/rdoc/fonts/Lato-Light.ttf: Hard-link target './var/lib/gems/2.5.0/doc/test-unit-3.2.8/rdoc/fonts/Lato-Light.ttf' does not exist.
./var/lib/gems/2.5.0/doc/rdoc-6.0.4/rdoc/fonts/Lato-LightItalic.ttf: Hard-link target './var/lib/gems/2.5.0/doc/test-unit-3.2.8/rdoc/fonts/Lato-LightItalic.ttf' does not exist.
./var/lib/gems/2.5.0/doc/rdoc-6.0.4/rdoc/fonts/Lato-Regular.ttf: Hard-link target './var/lib/gems/2.5.0/doc/test-unit-3.2.8/rdoc/fonts/Lato-Regular.ttf' does not exist.
./var/lib/gems/2.5.0/doc/rdoc-6.0.4/rdoc/fonts/Lato-RegularItalic.ttf: Hard-link target './var/lib/gems/2.5.0/doc/test-unit-3.2.8/rdoc/fonts/Lato-RegularItalic.ttf' does not exist.
./var/lib/gems/2.5.0/doc/power_assert-1.1.3/rdoc/js/jquery.js: Hard-link target './var/lib/gems/2.5.0/doc/test-unit-3.2.8/rdoc/js/jquery.js' does not exist.
./var/lib/gems/2.5.0/doc/power_assert-1.1.3/rdoc/fonts/Lato-Light.ttf: Hard-link target './var/lib/gems/2.5.0/doc/test-unit-3.2.8/rdoc/fonts/Lato-Light.ttf' does not exist.
./var/lib/gems/2.5.0/doc/power_assert-1.1.3/rdoc/fonts/Lato-LightItalic.ttf: Hard-link target './var/lib/gems/2.5.0/doc/test-unit-3.2.8/rdoc/fonts/Lato-LightItalic.ttf' does not exist.
./var/lib/gems/2.5.0/doc/power_assert-1.1.3/rdoc/fonts/Lato-Regular.ttf: Hard-link target './var/lib/gems/2.5.0/doc/test-unit-3.2.8/rdoc/fonts/Lato-Regular.ttf' does not exist.
./var/lib/gems/2.5.0/doc/power_assert-1.1.3/rdoc/fonts/Lato-RegularItalic.ttf: Hard-link target './var/lib/gems/2.5.0/doc/test-unit-3.2.8/rdoc/fonts/Lato-RegularItalic.ttf' does not exist.
./var/lib/gems/2.5.0/doc/net-telnet-0.2.0/rdoc/js/jquery.js: Hard-link target './var/lib/gems/2.5.0/doc/test-unit-3.2.8/rdoc/js/jquery.js' does not exist.
./var/lib/gems/2.5.0/doc/net-telnet-0.2.0/rdoc/fonts/Lato-Light.ttf: Hard-link target './var/lib/gems/2.5.0/doc/test-unit-3.2.8/rdoc/fonts/Lato-Light.ttf' does not exist.
./var/lib/gems/2.5.0/doc/net-telnet-0.2.0/rdoc/fonts/Lato-LightItalic.ttf: Hard-link target './var/lib/gems/2.5.0/doc/test-unit-3.2.8/rdoc/fonts/Lato-LightItalic.ttf' does not exist.
./var/lib/gems/2.5.0/doc/net-telnet-0.2.0/rdoc/fonts/Lato-Regular.ttf: Hard-link target './var/lib/gems/2.5.0/doc/test-unit-3.2.8/rdoc/fonts/Lato-Regular.ttf' does not exist.
./var/lib/gems/2.5.0/doc/net-telnet-0.2.0/rdoc/fonts/Lato-RegularItalic.ttf: Hard-link target './var/lib/gems/2.5.0/doc/test-unit-3.2.8/rdoc/fonts/Lato-RegularItalic.ttf' does not exist.
./var/lib/gems/2.5.0/doc/minitest-5.11.3/rdoc/js/jquery.js: Hard-link target './var/lib/gems/2.5.0/doc/test-unit-3.2.8/rdoc/js/jquery.js' does not exist.
./var/lib/gems/2.5.0/doc/minitest-5.11.3/rdoc/fonts/Lato-Light.ttf: Hard-link target './var/lib/gems/2.5.0/doc/test-unit-3.2.8/rdoc/fonts/Lato-Light.ttf' does not exist.
./var/lib/gems/2.5.0/doc/minitest-5.11.3/rdoc/fonts/Lato-LightItalic.ttf: Hard-link target './var/lib/gems/2.5.0/doc/test-unit-3.2.8/rdoc/fonts/Lato-LightItalic.ttf' does not exist.
./var/lib/gems/2.5.0/doc/minitest-5.11.3/rdoc/fonts/Lato-Regular.ttf: Hard-link target './var/lib/gems/2.5.0/doc/test-unit-3.2.8/rdoc/fonts/Lato-Regular.ttf' does not exist.
./var/lib/gems/2.5.0/doc/minitest-5.11.3/rdoc/fonts/Lato-RegularItalic.ttf: Hard-link target './var/lib/gems/2.5.0/doc/test-unit-3.2.8/rdoc/fonts/Lato-RegularItalic.ttf' does not exist.
./var/lib/gems/2.5.0/doc/fileutils-1.1.0/rdoc/js/jquery.js: Hard-link target './var/lib/gems/2.5.0/doc/test-unit-3.2.8/rdoc/js/jquery.js' does not exist.
./var/lib/gems/2.5.0/doc/fileutils-1.1.0/rdoc/fonts/Lato-Light.ttf: Hard-link target './var/lib/gems/2.5.0/doc/test-unit-3.2.8/rdoc/fonts/Lato-Light.ttf' does not exist.
./var/lib/gems/2.5.0/doc/fileutils-1.1.0/rdoc/fonts/Lato-LightItalic.ttf: Hard-link target './var/lib/gems/2.5.0/doc/test-unit-3.2.8/rdoc/fonts/Lato-LightItalic.ttf' does not exist.
./var/lib/gems/2.5.0/doc/fileutils-1.1.0/rdoc/fonts/Lato-Regular.ttf: Hard-link target './var/lib/gems/2.5.0/doc/test-unit-3.2.8/rdoc/fonts/Lato-Regular.ttf' does not exist.

This is the error I got when I tried to run wsl --set-version Ubuntu 2
I tried removing everything ruby related with sudo apt remove ruby* , still didn't work. currently trying with admin rights to see if that works.

(update) that did not work either.

@mhagnumdw
Copy link

@ckhordiasma
Copy link

ok, if I'm understanding this correctly, I need to clean up/uninstall old versions of rdoc, power_assert, net-telnet, minitest, and fileutils?

@ckhordiasma
Copy link

ckhordiasma commented Sep 15, 2020

ok so I had to reinstall ruby, and then tried cleaning up rdoc, power_assert, net-telnet, minitest, and fileutils. That didn't work, so then I uninstalled them with gem uninstall.

That didn't work either, then I noticed that the error message actually changed a bit:

./var/lib/gems/2.5.0/doc/etc-1.0.1/rdoc/js/jquery.js: Hard-link target './var/lib/gems/2.5.0/doc/test-unit-3.2.8/rdoc/js/jquery.js' does not exist.
./var/lib/gems/2.5.0/doc/etc-1.0.1/rdoc/fonts/Lato-Light.ttf: Hard-link target './var/lib/gems/2.5.0/doc/test-unit-3.2.8/rdoc/fonts/Lato-Light.ttf' does not exist.
./var/lib/gems/2.5.0/doc/etc-1.0.1/rdoc/fonts/Lato-LightItalic.ttf: Hard-link target './var/lib/gems/2.5.0/doc/test-unit-3.2.8/rdoc/fonts/Lato-LightItalic.ttf' does not exist.
./var/lib/gems/2.5.0/doc/etc-1.0.1/rdoc/fonts/Lato-Regular.ttf: Hard-link target './var/lib/gems/2.5.0/doc/test-unit-3.2.8/rdoc/fonts/Lato-Regular.ttf' does not exist.
./var/lib/gems/2.5.0/doc/etc-1.0.1/rdoc/fonts/Lato-RegularItalic.ttf: Hard-link target './var/lib/gems/2.5.0/doc/test-unit-3.2.8/rdoc/fonts/Lato-RegularItalic.ttf' does not exist.
./var/lib/gems/2.5.0/doc/did_you_mean-1.2.1/rdoc/js/jquery.js: Hard-link target './var/lib/gems/2.5.0/doc/test-unit-3.2.8/rdoc/js/jquery.js' does not exist.
./var/lib/gems/2.5.0/doc/did_you_mean-1.2.1/rdoc/fonts/Lato-Light.ttf: Hard-link target './var/lib/gems/2.5.0/doc/test-unit-3.2.8/rdoc/fonts/Lato-Light.ttf' does not exist.
./var/lib/gems/2.5.0/doc/did_you_mean-1.2.1/rdoc/fonts/Lato-LightItalic.ttf: Hard-link target './var/lib/gems/2.5.0/doc/test-unit-3.2.8/rdoc/fonts/Lato-LightItalic.ttf' does not exist.
./var/lib/gems/2.5.0/doc/did_you_mean-1.2.1/rdoc/fonts/Lato-Regular.ttf: Hard-link target './var/lib/gems/2.5.0/doc/test-unit-3.2.8/rdoc/fonts/Lato-Regular.ttf' does not exist.
./var/lib/gems/2.5.0/doc/did_you_mean-1.2.1/rdoc/fonts/Lato-RegularItalic.ttf: Hard-link target './var/lib/gems/2.5.0/doc/test-unit-3.2.8/rdoc/fonts/Lato-RegularItalic.ttf' does not exist.
./var/lib/gems/2.5.0/doc/csv-3.0.0/rdoc/js/jquery.js: Hard-link target './var/lib/gems/2.5.0/doc/test-unit-3.2.8/rdoc/js/jquery.js' does not exist.
./var/lib/gems/2.5.0/doc/csv-3.0.0/rdoc/fonts/Lato-Light.ttf: Hard-link target './var/lib/gems/2.5.0/doc/test-unit-3.2.8/rdoc/fonts/Lato-Light.ttf' does not exist.
./var/lib/gems/2.5.0/doc/csv-3.0.0/rdoc/fonts/Lato-LightItalic.ttf: Hard-link target './var/lib/gems/2.5.0/doc/test-unit-3.2.8/rdoc/fonts/Lato-LightItalic.ttf' does not exist.
./var/lib/gems/2.5.0/doc/csv-3.0.0/rdoc/fonts/Lato-Regular.ttf: Hard-link target './var/lib/gems/2.5.0/doc/test-unit-3.2.8/rdoc/fonts/Lato-Regular.ttf' does not exist.
./var/lib/gems/2.5.0/doc/csv-3.0.0/rdoc/fonts/Lato-RegularItalic.ttf: Hard-link target './var/lib/gems/2.5.0/doc/test-unit-3.2.8/rdoc/fonts/Lato-RegularItalic.ttf' does not exist.
./var/lib/gems/2.5.0/doc/bigdecimal-1.3.5/rdoc/js/jquery.js: Hard-link target './var/lib/gems/2.5.0/doc/test-unit-3.2.8/rdoc/js/jquery.js' does not exist.
./var/lib/gems/2.5.0/doc/bigdecimal-1.3.5/rdoc/fonts/Lato-Light.ttf: Hard-link target './var/lib/gems/2.5.0/doc/test-unit-3.2.8/rdoc/fonts/Lato-Light.ttf' does not exist.
./var/lib/gems/2.5.0/doc/bigdecimal-1.3.5/rdoc/fonts/Lato-LightItalic.ttf: Hard-link target './var/lib/gems/2.5.0/doc/test-unit-3.2.8/rdoc/fonts/Lato-LightItalic.ttf' does not exist.
./var/lib/gems/2.5.0/doc/bigdecimal-1.3.5/rdoc/fonts/Lato-Regular.ttf: Hard-link target './var/lib/gems/2.5.0/doc/test-unit-3.2.8/rdoc/fonts/Lato-Regular.ttf' does not exist.
./var/lib/gems/2.5.0/doc/bigdecimal-1.3.5/rdoc/fonts/Lato-RegularItalic.ttf: Hard-link target './var/lib/gems/2.5.0/doc/test-unit-3.2.8/rdoc/fonts/Lato-RegularItalic.ttf' does not exist.

So now I'm trying to the uninstall etc, did_you_mean, csv, bigdecimal gems and see how that works.

edit - that worked! so basically I checked the error message for ruby gems causing the problem, and iteratively removed gems until I was able to fix it.

@Eyal51
Copy link

Eyal51 commented Sep 23, 2020

That did it for me:
for i in $(gem list | awk {'print $1'}); do gem uninstall $i -ax --force; done

@jtcarse
Copy link

jtcarse commented Oct 3, 2020

Even after uninstalling as many of the gems as I could (some were default; using --force per @Eyal51 would likely have fixed that), I was still having trouble. I ultimately just did a sudo apt uninstall ruby and rm -rf /var/lib/gems. That fixed it for me, and setting the WSL version of the Ubuntu app to 2 gave me back Ruby anyway.

@Sieboldianus
Copy link

Even after uninstalling as many of the gems as I could (some were default; using --force per @Eyal51 would likely have fixed that), I was still having trouble. I ultimately just did a sudo apt uninstall ruby and rm -rf /var/lib/gems. That fixed it for me, and setting the WSL version of the Ubuntu app to 2 gave me back Ruby anyway.

I experienced the same. I did:

  • gem cleanup --dryrun and gem cleanup
  • apt remove ruby
  • rm -rf /home/$USER/gems

@NOOMA-42
Copy link

NOOMA-42 commented Oct 22, 2021

Importing the distribution failed.
./usr/lib/systemd/user/gsd-a11y-settings.service: Can't create 'usr/lib/systemd/user/gsd-a11y-settings.service'
./usr/lib/systemd/user/gsd-a11y-settings.target: Can't create 'usr/lib/systemd/user/gsd-a11y-settings.target'
./usr/lib/systemd/user/gsd-color.service: Can't create 'usr/lib/systemd/user/gsd-color.service'
./usr/lib/systemd/user/gsd-color.target: Can't create 'usr/lib/systemd/user/gsd-color.target'
./usr/lib/systemd/user/gsd-datetime.service: Can't create 'usr/lib/systemd/user/gsd-datetime.service'
./usr/lib/systemd/user/gsd-datetime.target: Can't create 'usr/lib/systemd/user/gsd-datetime.target'
./usr/lib/systemd/user/gsd-housekeeping.service: Can't create 'usr/lib/systemd/user/gsd-housekeeping.service'
./usr/lib/systemd/user/gsd-housekeeping.target: Can't create 'usr/lib/systemd/user/gsd-housekeeping.target'
./usr/lib/systemd/user/gsd-keyboard.service: Can't create 'usr/lib/systemd/user/gsd-keyboard.service'
./usr/lib/systemd/user/gsd-keyboard.target: Can't create 'usr/lib/systemd/user/gsd-keyboard.target'
./usr/lib/systemd/user/gsd-media-keys.service: Can't create 'usr/lib/systemd/user/gsd-media-keys.service'
./usr/lib/systemd/user/gsd-media-keys.target: Can't create 'usr/lib/systemd/user/gsd-media-keys.target'
./usr/lib/systemd/user/gsd-power.service: Can't create 'usr/lib/systemd/user/gsd-power.service'
./usr/lib/systemd/user/gsd-power.target: Can't create 'usr/lib/systemd/user/gsd-power.target'
./usr/lib/systemd/user/gsd-print-notifications.service: Can't create 'usr/lib/systemd/user/gsd-print-notifications.service'
./usr/lib/systemd/user/gsd-print-notifications.target: Can't create 'usr/lib/systemd/user/gsd-print-notifications.target'
./usr/lib/systemd/user/gsd-rfkill.service: Can't create 'usr/lib/systemd/user/gsd-rfkill.service'
./usr/lib/systemd/user/gsd-rfkill.target: Can't create 'usr/lib/systemd/user/gsd-rfkill.target'
./usr/lib/systemd/user/gsd-screensaver-proxy.service: Can't create 'usr/lib/systemd/user/gsd-screensaver-proxy.service'
./usr/lib/systemd/user/gsd-screensaver-proxy.target: Can't create 'usr/lib/systemd/user/gsd-screensaver-proxy.target'
./usr/lib/systemd/user/gsd-sharing.service: Can't create 'usr/lib/systemd/user/gsd-sharing.service'
./usr/lib/systemd/user/gsd-sharing.target: Can't create 'usr/lib/systemd/user/gsd-sharing.target'
./usr/lib/systemd/user/gsd-smartcard.service: Can't create 'usr/lib/systemd/user/gsd-smartcard.service'
./usr/lib/systemd/user/gsd-smartcard.target: Can't create 'usr/lib/systemd/user/gsd-smartcard.target'
./usr/lib/systemd/user/gsd-sound.service: Can't create 'usr/lib/systemd/user/gsd-sound.service'
./usr/lib/systemd/user/gsd-sound.target: Can't create 'usr/lib/systemd/user/gsd-sound.target'
./usr/lib/systemd/user/gsd-usb-protection.service: Can't create 'usr/lib/systemd/user/gsd-usb-protection.service'
./usr/lib/systemd/user/gsd-usb-protection.target: Can't create 'usr/lib/systemd/user/gsd-usb-protection.target'
./usr/lib/systemd/user/gsd-wacom.service: Can't create 'usr/lib/systemd/user/gsd-wacom.service'
./usr/lib/systemd/user/gsd-wacom.target: Can't create 'usr/lib/systemd/user/gsd-wacom.target'
./usr/lib/systemd/user/gsd-wwan.service: Can't create 'usr/lib/systemd/user/gsd-wwan.service'
./usr/lib/systemd/user/gsd-wwan.target: Can't create 'usr/lib/systemd/user/gsd-wwan.target'
./usr/lib/systemd/user/gsd-xsettings.service: Can't create 'usr/lib/systemd/user/gsd-xsettings.service'
./usr/lib/systemd/user/gsd-xsettings.target: Can't create 'usr/lib/systemd/user/gsd-xsettings.target'
./usr/lib/systemd/user/paths.target: Can't create 'usr/lib/systemd/user/paths.target'
./usr/lib/systemd/user/pk-debconf-helper.service: Can't create 'usr/lib/systemd/user/pk-debconf-helper.service'
./usr/lib/systemd/user/pk-debconf-helper.socket: Can't create 'usr/lib/systemd/user/pk-debconf-helper.socket'
./usr/lib/systemd/user/powerline-daemon.service: Can't create 'usr/lib/systemd/user/powerline-daemon.service'
./usr/lib/systemd/user/printer.target: Can't create 'usr/lib/systemd/user/printer.target'
./usr/lib/systemd/user/pulseaudio.service: Can't create 'usr/lib/systemd/user/pulseaudio.s

I got this error. any idea to solve it?.. I see some post mentioning storage issue and now I have 14G left in my disk. Not sure if this relate.

@D3vil0p3r
Copy link

D3vil0p3r commented Apr 3, 2023

I get a similar issue during the conversion from WSL 1 to WSL 2 with an Arch Linux-based WSL image:

Conversion in progress, this may take a few minutes...
For information on key differences with WSL 2 please visit https://aka.ms/wsl2
Importing the distribution failed.
./usr/lib/cups/backend/: Can't create 'usr/lib/cups/backend'
./usr/lib/cups/backend/smb: Failed to create dir 'usr/lib/cups/backend'
./usr/lib/cryptsetup/libcryptsetup-token-systemd-fido2.so: Can't create 'usr/lib/cryptsetup/libcryptsetup-token-systemd-fido2.so'
./usr/lib/cryptsetup/libcryptsetup-token-systemd-pkcs11.so: Can't create 'usr/lib/cryptsetup/libcryptsetup-token-systemd-pkcs11.so'
./usr/lib/cryptsetup/libcryptsetup-token-systemd-tpm2.so: Can't create 'usr/lib/cryptsetup/libcryptsetup-token-systemd-tpm2.so'
./usr/lib/coreutils/libstdbuf.so: Can't create 'usr/lib/coreutils/libstdbuf.so'
./usr/lib/colord-sensors/libcolord_sensor_argyll.so: Can't create 'usr/lib/colord-sensors/libcolord_sensor_argyll.so'
./usr/lib/colord-sensors/libcolord_sensor_colorhug.so: Can't create 'usr/lib/colord-sensors/libcolord_sensor_colorhug.so'
./usr/lib/colord-sensors/libcolord_sensor_dtp94.so: Can't create 'usr/lib/colord-sensors/libcolord_sensor_dtp94.so'
./usr/lib/colord-sensors/libcolord_sensor_dummy.so: Can't create 'usr/lib/colord-sensors/libcolord_sensor_dummy.so'
./usr/lib/colord-sensors/libcolord_sensor_huey.so: Can't create 'usr/lib/colord-sensors/libcolord_sensor_huey.so'
./usr/lib/colord-plugins/libcolord_sensor_camera.so: Can't create 'usr/lib/colord-plugins/libcolord_sensor_camera.so'
./usr/lib/colord-plugins/libcolord_sensor_scanner.so: Can't create 'usr/lib/colord-plugins/libcolord_sensor_scanner.so'
./usr/lib/code/code.js: Can't create 'usr/lib/code/code.js'
./usr/lib/code/extensions/: Can't create 'usr/lib/code/extensions'
./usr/lib/code/LICENSE.txt: Can't create 'usr/lib/code/LICENSE.txt'
./usr/lib/code/node_modules.asar: Can't create 'usr/lib/code/node_modules.asar'
./usr/lib/code/node_modules.asar.unpacked/: Can't create 'usr/lib/code/node_modules.asar.unpacked'
./usr/lib/code/out/: Can't create 'usr/lib/code/out'
./usr/lib/code/package.json: Can't create 'usr/lib/code/package.json'
./usr/lib/code/product.json: Can't create 'usr/lib/code/product.json'
./usr/lib/code/resources/: Can't create 'usr/lib/code/resources'
./usr/lib/code/ThirdPartyNotices.txt: Can't create 'usr/lib/code/ThirdPartyNotices.txt'
./usr/lib/code/resources/linux/: Failed to create dir 'usr/lib/code/resources'
./usr/lib/code/resources/linux/code.png: Failed to create dir 'usr/lib/code/resources'
./usr/lib/code/out/bootstrap-amd.js: Failed to create dir 'usr/lib/code/out'
./usr/lib/code/out/bootstrap-fork.js: Failed to create dir 'usr/lib/code/out'
./usr/lib/code/out/bootstrap-node.js: Failed to create dir 'usr/lib/code/out'
./usr/lib/code/out/bootstrap-window.js: Failed to create dir 'usr/lib/code/out'
./usr/lib/code/out/bootstrap.js: Failed to create dir 'usr/lib/code/out'
./usr/lib/code/out/cli.js: Failed to create dir 'usr/lib/code/out'
./usr/lib/code/out/main.js: Failed to create dir 'usr/lib/code/out'
./usr/lib/code/out/nls.metadata.json: Failed to create dir 'usr/lib/code/out'
./usr/lib/code/out/vs/: Failed to create dir 'usr/lib/code/out'
./usr/lib/code/out/vscode-dts/: Failed to create dir 'usr/lib/code/out'
./usr/lib/code/out/vscode-dts/vscode.d.ts: Failed to create dir 'usr/lib/code/out'
./usr/lib/code/out/vs/base/: Failed to create dir 'usr/lib/code/out'
./usr/lib/code/out/vs/code/: Failed to create dir 'usr/lib/code/out'
./usr/lib/code/out/vs/editor/: Failed to create dir 'usr/lib/code/out'
./usr/lib/code/out/vs/loader.js: Failed to create dir 'usr/lib/code/out'
./usr/lib/code/out/vs/platform/: Failed to create dir 'usr/lib/code/out'
./usr/lib/code/out/vs/workbench/: Failed to create dir 'usr/lib/code/out'
./usr/lib/code/out/vs/workbench/api/: Failed to create dir 'usr/lib/code/out'
./usr/lib/code/out/vs/workbench/browser/: Failed to create dir 'usr/lib/code/out'
./usr/lib/code/out/vs/workbench/contrib/: Failed to create dir 'usr/lib/code/out'
./usr/lib/code/out/vs/workbench/services/: Failed to create dir 'usr/lib/code/out'
./usr/lib/code/out/vs/workbench/workbench.desktop.main.css: Failed to create dir 'usr/lib/code/out'
./usr/lib/code/out/vs/workbench/workbench.desktop.main.js: Failed to create dir 'usr/lib/code/out'
./usr/lib/code/out/vs/workbench/workbench.desktop.main.nls.js

I don't understand why the conversion to WSL 2 should care about these files above...

Copy link
Contributor

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

15 participants