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

missing dll when trying to install debian #3456

Closed
numEricL opened this issue Aug 10, 2018 · 33 comments
Closed

missing dll when trying to install debian #3456

numEricL opened this issue Aug 10, 2018 · 33 comments

Comments

@numEricL
Copy link

Windows Version 10.0.16299.551

I'm unable to install debian gnu\linux from the microsoft store. Installation fails immediately and debian.exe throws a system error: code execution cannot proceed because api-ms-win-core-console-l2-2-0.dll was not found.

@derousse
Copy link

I have a similar issue but I had debian working fine previously. I'm not certain it's related, but I did some driver updates through the Lenovo Vantage utility earlier today and now I get this exact same error when trying to start a bash window.
image

I tried uninstalling Debian, turning off Windows Subsystem for Linux and then turning it back on and reinstalling Debian. I'm still getting the same error.

@derousse
Copy link

I just installed Ubuntu and it works fine. Still no luck with Debian though...

@0xbadfca11
Copy link

debian.exe was updated few days ago. ubuntu.exe is not. Lenovo software does not matter.
https://www.virustotal.com/#/file/b11a6b5812df69e70dc04e7812a64a54d946e3680f4e051cd99566c93efd3eca/details
https://www.virustotal.com/#/file/a4309682690a8dc9b02b4df07654b7991c3d84e60a7ba6b01ae6d61f97dddcd6/details
The difference between them is the version of MSVC used.

@Biswa96
Copy link

Biswa96 commented Aug 11, 2018

Yes, there are some new commits in GitLab Debian-WSL project. @rhaist may help.
How about compiling the debian.exe with multi-threaded option (/MT) to remove VC runtime dependency? Though it will increase the file size.

@rhaist
Copy link

rhaist commented Aug 12, 2018

I did update the Debian store app to use some of the new upstream features and bug fixes.

Can you post your current WIn10 build version?
(https://support.microsoft.com/en-gb/help/13443/windows-which-operating-system)

As I also had to bump the WindowsTargetPlatformMinVersion you might have to update your base system:
https://salsa.debian.org/rhaist-guest/WSL/blob/v2/DistroLauncher-Appx/DistroLauncher-Appx.vcxproj#L10

@stabidlo
Copy link

i'm running 16299, same problem - checked again few minutes ago

@raghavk92
Copy link

i tried to open debian today and i got the same error(api-ms-win-core-console-l2-2-0.dll not found. Its asking me to reinstall but as i see above reinstall wont help and if i reinstall i will loose all the packages i have installed . So should i wait for the solution or should i do something. I didnt update anything .

Currently running windows 10 1709

@Jotune
Copy link

Jotune commented Aug 13, 2018

I've done a windows update yesterday and my Debian isn't working anymore. I have same issue than the one mentioned above.

It's a shame because the popup tells us to reinstall (lose all previous config) and it actually doesn't fix the issue....

Also running on W10 1709.

@rhaist
Copy link

rhaist commented Aug 13, 2018

I am sorry you all have problems with the latest release. I have no clue why this happens for some people atm., as I don't know much of the inner workings of this pretty new WIN10 feature.

I will try to reproduce the problem, but this might take some time.

@benhillis
Copy link
Member

I'll look into this as well. Likely a compiler setting when the app was built.

@Biswa96
Copy link

Biswa96 commented Aug 13, 2018

@rhaist The function SetConsoleTitleW(), in DistroLauncher.cpp file, imported from api-ms-win-core-console-l2-2-0.dll, the real files are KernelBase.dll and ucrtbase.dll.

You may add the multithreaded option /MT in DistroLauncher.vcxproj file as follows

<ClCompile>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
</ClCompile>

Or compile the Debian.exe file with gcc in mingw-w64 toolset. Or this may work to set console tittle:

std::cout << "\033]0;" << title << "\007";

@benhillis
Copy link
Member

benhillis commented Aug 13, 2018

@rhaist - If you bumped the WindowsTargetPlatformMinVersion in the visual studio solution, you will also need to change your TargetPlatformMinVersion in your appx manifest. Why Visual Studio lets you do this is a very good question, but I think that's the issue you are running into.

@ijustlovemath
Copy link

Glad I'm not the only one seeing this error. I'm up to date, running Win10 Pro, on a Lenovo T530

@LordWolfenstein
Copy link

It says I am missing "api-ms-win-core-console-l2-0-0.dll" when trying to start Debian. Uninstall and reinstall did not fix the problem.

@Aheleos
Copy link

Aheleos commented Aug 14, 2018

I too am unfortunately having this problem. I have installed Ubuntu for now, but it has extra complications for what I'm doing that has some of my work impacted. My personal server is Debian as well so I am really looking forward to the fix.

I am also happy to help in any way (testing, info, etc).

Running Windows 10 Education Edition
Version 1709
OS Build 16299.547

@Biswa96
Copy link

Biswa96 commented Aug 14, 2018

Just use wsl.exe or bash.exe. Debian.exe (and others) eventually executes wsl.exe with standard I/O handles via WslLaunch() and WslLaunchInteractive() functions.

If someone has multiple distributions installed in WSL then use wslconfig.exe /s Debian to make Debian a default distribution. Alternatively, latest insider builds have wsl.exe --distribution option, copy only that wsl.exe binary and execute it.

@Aheleos
Copy link

Aheleos commented Aug 14, 2018

Thank you for the tip. That definitely brings up a window. Unfortunately it's to my Ubuntu installation. I would rather not uninstall that and lose what I have if I don't have to.

@benhillis
Copy link
Member

@Aheleos - You can use wslconfig.exe to change your default distribution.

@Aheleos
Copy link

Aheleos commented Aug 14, 2018

I was really excited at the idea of that and looked up wslconfig to read through the options, but since I tried to uninstall and reinstall Debian before, it's now installed, but unregistered and not on the list.

Thank you guys for the quick response and help with this.

@ijustlovemath
Copy link

ijustlovemath commented Aug 14, 2018

To be clear, this is NOT a fix for the issue, merely a workaround for those who haven't already uninstalled Debian/installed Ubuntu, which according to the suggestion made by the program, is probably very few people

@rhaist
Copy link

rhaist commented Aug 14, 2018

Thank you all for bearing with me.
I am just uploading an update to the Debian app recompiled for target version Build 16299 (Fall Creators Update, Version 1709).

I hope this will solve your problems.

@Aheleos
Copy link

Aheleos commented Aug 14, 2018

Thank you. I really appreciate the effort.

@rhaist
Copy link

rhaist commented Aug 14, 2018

Store submission went through really fast this time.
You should receive the updated app now if you search for updates in the Windows Store App.

Please tell me if it works.

@waltersom
Copy link

waltersom commented Aug 14, 2018 via email

@numEricL
Copy link
Author

Confirmed working on build 16299. Thanks much!

@ijustlovemath
Copy link

Also works for me! Thanks @rhaist

@Aheleos
Copy link

Aheleos commented Aug 14, 2018

Awesome. Thank you @rhaist, @Biswa96, @benhillis and everyone else that contributed to the discussion.

@TWXjm
Copy link

TWXjm commented Aug 15, 2018

Working for me too, thank you all.
The output of uname -a is quite different from the screenshot on the store though. It seems my kernel is much older. Any ideas on how to upgrade it? "apt-get dist-upgrade" shows no upgrades available. Do I need to add another repository?

$ uname -a
Linux box1 4.4.0-43-Microsoft #1-Microsoft Wed Dec 31 14:42:53 PST 2014 x86_64 GNU/Linux

Windows 10 Enterprise, version 1709, OS Build 16299.492

@benhillis
Copy link
Member

@TWXjm - There is no Linux kernel in WSL, thus no way to upgrade it. The driver that handles the syscall translation is tied to your Windows build number.

@TWXjm
Copy link

TWXjm commented Aug 15, 2018

Hi @benhillis, It seems I need to read up on how WSL works. thank you.

@WSLUser
Copy link

WSLUser commented Aug 16, 2018

@rhaist Is there a way for you to add some logic (or did you already) so that the newer Store infrastructure functionalities you adopted can be used if you're using a newer version of Windows that supports it?

@Biswa96
Copy link

Biswa96 commented Aug 16, 2018

@DarthSpock He followed BenHillis's suggestion. There are some specific rules that should be maintained in project files so that Visual Studio can build the correct AppxManifest file *. See this commit, only the Windows Version was changed in project files.

* It can also be written just by typing

@WSLUser
Copy link

WSLUser commented Aug 16, 2018

Yes I see. Thanks for the info.

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