-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Self-contained applications in Linux does not work #6325
Comments
@AlbertoMonteiro can you share the contents of the You should also try running |
@AlbertoMonteiro I am not able to repro this when using This is a linux shell requirement, and not something we control in the cli. Please reopen if you still have issues. |
I have the same problem, but after exec ./hwapp I get this below error: |
@brthor It worked on the machined(ubuntu.14.04-x64) that I ran the publish command. I copied the output to another Linux distro(AWS Linux), and I got the same error pointed by @henrylle
|
@henrylle @AlbertoMonteiro Have you installed the dependencies of .NET Core? You can use the debian package to bring them in with the installation of the cli or you need to install them manually. You can see the list of packages in this dockerfile: |
@AlbertoMonteiro @henrylle The following link helped me resolve the library issue: |
For anyone still running into this, try
|
@dejfcz 's answer solved this problem for me. |
@dejfcz 's answer solved this problem for me too! |
It solves the problem, but not the real issue. The application is not self-contained if it depends on a workaround. A self-contain application should run using just the kernel (i.e. Go with Docker scratch image). |
Or at least it should display a message that dependency is not installed |
any updates on that? Is it possible to make a build truly self contained and include this dependency somehow? |
On CoreOS, it's impossible to install |
This is not really a CLI issue at this point. When you are running a self-contained app or a portable app, you only use the runtime for that. I would suggest filling a separate issue about native dependencies on CoreOS over at dotnet/core-setup. |
could we simply make the |
I was having the same problem on ubuntu 17.04, after installing libunwind8 with apt the .NET Core application was running successfully. |
Today we published and tried to run simple console app on fresh ubuntu WSL (16.04 LTS) & ubuntu azure (16.04 LTS). dotnetcore2 The same problem appeared. Installing libunwind8 did the job. Is it going to be fixed at all? This way linux publish is not self contained. PERIOD. |
There is a document describing how to include 3rd party libraries for self-contained apps: https://github.com/dotnet/core/blob/master/Documentation/self-contained-linux-apps.md Related: https://github.com/dotnet/coreclr/issues/5853
|
Having the same issue "error: libunwind.so.8: cannot open shared object file: No such file or directory" This needs to be fixed. |
When all else fails, pull the missing libraries from the microsoft docker image. Quick example from my macbook: Creating the project: $ mkdir test && cd test
$ dotnet new console && dotnet publish -r linux-x64 --self-contained -o bin If you run it on linux, expected result:
Pull the libraries via docker (
Re-test:
Success! @WhatFreshHellIsThis @dasMulli @FDUdannychen |
@brthor I still cant run in my arm-32 for I cant install any lib. |
@lindexi You're going to have to pull the libraries from one of the ARM 32 docker images. I suspect the path to the libraries will be different as well (not (See Here)[https://hub.docker.com/r/microsoft/dotnet/] |
@livarcocc The experience surrounding this issue is awful, consider reopening it and fixing at least the experience if not the issue itself. The average .NET Core user has no clue what This isn't an isolated incident either, this is a problem for EVERY self-contained linux app deployed to a machine without a portable framework installed. Self-contained apps are exactly the same as portable apps from a (single) deployment and usability perspective, for this reason. There are several ways to solve this problem (without distributing the libraries yourself), I think the easiest of which is to print a command or set of commands that the user can copy/paste to run on their target machine (i.e. |
@brthor Thx , but I cant install anything on my linux for it's a microcomputer that can only install when reinstalling the system. That I cant use docker or install libunwin.so.8 . |
Or if you running on CentOs then run |
I just had this issue with .NET Core 2.2 on ARMHF and Docker. The fix was to add the |
5 years later, this is still happening with |
Steps to reproduce
mkdir hwapp
cd hwapp
dotnet new
dotnet restore
dotnet publish -o out
cd out
hwapp
Expected behavior
Print Hello World!
Actual behavior
Environment data
The text was updated successfully, but these errors were encountered: