3

I am using Visual Studio .net Core with Linux Docker Contianers. I am attempting to use dlopen, which is part of the libdl.so library. I get:

DllNotFoundException

.

Unable to load shared library libdl.so or one of its dependencies

I was going to download the .so somewhere and put it in the execution path. Unfortunately I could not find a straight copy of libdl.so.

Is there some way to include this library? Maybe a Nuget package Thanks

Felipe Augusto
  • 7,733
  • 10
  • 39
  • 73
  • 1
    It’s a standard part of the system C library. What’s your Dockerfile look like? – David Maze Jul 31 '18 at 20:15
  • FROM microsoft/dotnet:2.1-aspnetcore-runtime AS base WORKDIR /app EXPOSE ##### EXPOSE ##### FROM microsoft/dotnet:2.1-sdk AS build WORKDIR /src COPY XXXX/XXXX.csproj XXXX/ COPY XXXX.XXXX/XXXX.XXXX.XXXX XXXX.XXXX/ COPY XXXX.XXXX/XXXX.XXXX.XXXX XXXX.XXXX/ COPY XXXX/XXXX.XXXX.XXXX XXXX/ RUN dotnet restore CalcAPI/CalcAPI.csproj COPY . . WORKDIR /src/XXXX RUN dotnet build XXXX.csproj -c Release -o /app FROM build AS publish RUN dotnet publish XXXX.csproj -c Release -o /app FROM base AS final WORKDIR /app COPY --from=publish /app . ENTRYPOINT ["dotnet", "XXXX.dll"] – Jimmer Flash Jul 31 '18 at 20:40
  • Edit your question to include the Dockerfile with correct formatting please. – Lex Li Jul 31 '18 at 21:56
  • duplicate https://stackoverflow.com/questions/75855053/how-to-address-crash-due-to-missing-libdl-so-on-ubuntu-22 – user5994461 Mar 27 '23 at 12:18

0 Answers0