-
Notifications
You must be signed in to change notification settings - Fork 93
Getting the error "Unable to load DLL 'libdl'" on Ubuntu docker container with container image, microsoft/aspnetcore-build:2.0 #40
Comments
|
I am not sure its possible to create a symlink in docker container. https://stackoverflow.com/questions/31881904/docker-follow-symlink-outside-context And I updated my docker file like below, I still get the same error. I am using Ubuntu 16.04 in my production environment. FROM microsoft/aspnetcore-build:2.0 RUN apt-get update RUN npm install typings -g RUN ln -s /lib64/libdl.so.2 /lib64/libdl.so COPY . /app RUN ["dotnet", "--info"] EXPOSE 5000/tcp RUN ["dotnet", "publish"] WORKDIR /app/MyWeb/bin/Debug/netcoreapp2.0/publish ENTRYPOINT ["dotnet", "MyWeb.dll"] |
I also have some problem. use ln -s /lib64/libdl.so.2 /lib64/libdl.so , But it doesn't work in the Docker , I am using Centos 7.3 64bit |
Revert to v1.5.2 which uses
Also you need to install libgdiplus too.
|
when I run install libgdiplus ,I only find libgdiplus.so.0 in /usr/lib64, not find libgdiplus.so ,then I run |
For CentOS 7 and above:
|
why the command yum install libgdiplus dosen't work,must execute the commands you write |
I did it according to what you said
but the excption is also existence |
I according to http://www.mono-project.com/docs/advanced/pinvoke/dllnotfoundexception/ |
The only way i was able to work around this issue was by reverting to v1.5.2 and adding the following symlink: Thanks @VahidN |
If you are using 1.5.4, update your |
About
|
FROM microsoft/aspnetcore is ok |
samples: dotnet-ascpnetcore-runtime:2.1 |
@justmine66 It works for me, but package lsof may be unnecessary, and make symbol link for gidplus.dll is also unnecessary.
|
I am trying to generate the excel sheet, using EPPlus.Core in dotnet core 2.0 framework. The generation works fine on local machine running windows. When I test the same on Ubuntu docker images, it fails with the below exception:
Unable to load DLL 'libdl': The specified module or one of its dependencies could not be found.
(Exception from HRESULT: 0x8007007E)
at Interop.Libdl.dlopen(String fileName, Int32 flag)
at System.Drawing.SafeNativeMethods.Gdip.LoadNativeLibrary()
at System.Drawing.SafeNativeMethods.Gdip..cctor()
The same used to work fine when I used the dotnet core 1.1, with libgdiplus being explicitely installed. But this setup fails with dotnet core 2.0.
The complete docker file is as below:
FROM microsoft/aspnetcore-build:2.0
RUN apt-get update
RUN apt-get install -y libgdiplus
RUN npm install typings -g
COPY . /app
WORKDIR /app/MyWeb
RUN ["dotnet", "--info"]
RUN ["dotnet", "restore"]
EXPOSE 5000/tcp
ENV ASPNETCORE_URLS http://*:5000
RUN ["dotnet", "publish"]
WORKDIR /app/MyWeb/bin/Debug/netcoreapp2.0/publish
ENTRYPOINT ["dotnet", "MyWeb.dll"]
The text was updated successfully, but these errors were encountered: