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

apt-get update & apt-get upgrade somehow killed Windows subsystem for Linux #4072

Closed
rfausey opened this issue May 28, 2019 · 13 comments
Closed

Comments

@rfausey
Copy link

rfausey commented May 28, 2019

I am running Ubuntu 16.04 LTS on Win 10. When I run apt-get update & apt-get upgrade, and then close the shell, I cannot restart the shell; all I get is a blank window with a blinking cursor. Something with the upgrade is killing Ubuntu.

@rfausey rfausey closed this as completed May 28, 2019
@rfausey rfausey reopened this May 28, 2019
@craigloewen-msft
Copy link
Member

Hi @rfausey !

What version of Windows are you running? Are you running apt-get update and apt-get upgrade and then immediately closing the Window or are you letting them run and leaving the Window open? Does this issue happen with any other distributions?

@rfausey
Copy link
Author

rfausey commented May 28, 2019

I am running version 1809 build 1776.529. I ran a windows update so this is current for me as of right now.

Are you running apt-get update and apt-get upgrade and then immediately closing the Window or > are you letting them run and leaving the Window open?

Both commands complete, so I'm not exactly sure what you mean.

As a test I installed Debian from the MS Store. I then ran 'apt-get update' the 'apt-get upgrade'. The upgrade broke Debian & Ubuntu both. I did not run an upgrade on Ubuntu just Debain.

I can not just remove the WSL package and re-install it. I need to remove the package and remove the files in %USERPROFILE%\AppData\Local\Packages\

@craigloewen-msft
Copy link
Member

craigloewen-msft commented May 28, 2019

If you'd like to remove your WSL package and reinstall it (Please note: this will delete all the files that you have in your WSL distro!) you can use the command:

wsl --unregister <DistroName>

And then you can reinstall the distro by opening up the app (like the Ubuntu app or Debian app etc.)

Could you try reinstalling and see if that fixes it? If not we can dive further into what may be causing this.

EDIT: Also please try restarting Windows!

@craigloewen-msft
Copy link
Member

This also could be a related issue to #2352 and #4047

@rfausey
Copy link
Author

rfausey commented May 29, 2019

Yes my issue is similar to #2352

I don't have wsl installed, in the powershell I got a command not found.
So I disabled 'Windows Subsystem for Linux' rebooted,
then enabled 'Windows Subsystem for Linux'.

I was able to run apt-get update and upgrade packages.
After some testing I have discovered apt-get update alone will kill bash.
bash can not executed from an Linux shell or the PowerShell.
Rebooting does fix this.

Installed wsl with apt-get. I am getting a syntax error with the --unregister
option or no output.

@rfausey
Copy link
Author

rfausey commented May 29, 2019

Hope this helps.

lxcore.zip

@1nj3cti0n
Copy link

Did you fix this? I have the exact same problem as #2352. Blank screen

@rfausey
Copy link
Author

rfausey commented May 30, 2019

Did you fix this? I have the exact same problem as #2352. Blank screen

Not fixed but a workaround. I disabled & enabled Windows Subsystem for Linux the reinstalled Ubuntu.

I couldn't get wsl --unregister <DistroName> to work. The Linux binaries are located in `%USERPROFILE%\AppData\Local\Packages' you could try deleting it and reinstalling.

Now when I run apt-get update & apt-get upgrade if I get a blank terminal rebooting fixes it.

@1nj3cti0n
Copy link

Did you fix this? I have the exact same problem as #2352. Blank screen

Not fixed but a workaround. I disabled & enabled Windows Subsystem for Linux the reinstalled Ubuntu.

I couldn't get wsl --unregister <DistroName> to work. The Linux binaries are located in `%USERPROFILE%\AppData\Local\Packages' you could try deleting it and reinstalling.

Now when I run apt-get update & apt-get upgrade if I get a blank terminal rebooting fixes it.

Didn't work for me sadly

@mwbaxter11
Copy link

Hello there. WSL is great but I'm having a frequent reproducible problem where it gets into a bad state after an earlier usage. When it's bad, there is only a flashing cursor after typing 'bash' and WSL does not start similar to #2352. The bad state seems to happen after running a script which uses rsync to copy data from a remote server. The only cure appears to be to restart the PC. I'm running Ubuntu 16.04 and recently upgraded to Windows 1903 (build 18362.175) to try to fix the problem. That made the problem less prevalent, but it still happens frequently. Happy to give more info or diagnostics. Very grateful for any advice, comment or workarounds.

@offero
Copy link

offero commented Jun 24, 2019

I am getting a powershell error every time wsl tries to run a powershell command now after an apt-get upgrade/update. For example, I have neovim set up to run
powershell.exe -Command Get-Clipboard<CR> as a leader command to paste from the system clipboard and I am seeing this error:

image

From WSL shell:
Does not error: powershell.exe -Command Get-Clipboard
Errors:

  1. echo $(powershell.exe -Command Get-Clipboard)
  2. powershell.exe -Command Get-Clipboard | echo

@offero
Copy link

offero commented Jun 24, 2019

Okay a system reboot seems to have cleared up my problems. Sorry for the noise.

@therealkenc
Copy link
Collaborator

This submission could not be reproduced locally. If the problem persists on 1904[23], please open a new ticket following the template, including detailed CLI steps to manifest the problem.

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

No branches or pull requests

6 participants