question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Alpine: dependencies is missing for Dotnet Core

See original GitHub issue

Azure pipelines agent (VSTS/TFS Agent) failed to start at dotnet:alpine images.

I tried different combination of alpine3.7+ image with dotnet2.1.4 or even 3.0 Each time run-time stuck because of dotnet dependencies issue:

su -c /agent/config.sh vsts-user

ldd: cannot load ./bin/libcoreclr.so: No such file or directory
ldd: cannot load ./bin/System.Security.Cryptography.Native.OpenSsl.so: No such file or directory
ldd: cannot load ./bin/System.IO.Compression.Native.so: No such file or directory
ldd: cannot load ./bin/System.Net.Http.Native.so: No such file or directory
Libicu's dependencies is missing for Dotnet Core 2.0
Execute ./bin/installdependencies.sh to install any missing Dotnet Core 2.0 dependencies.

/agent/bin/installdependencies.sh

--------OS Information--------
NAME="Alpine Linux"
ID=alpine
VERSION_ID=3.8.0
PRETTY_NAME="Alpine Linux v3.8"
HOME_URL="http://alpinelinux.org"
BUG_REPORT_URL="http://bugs.alpinelinux.org"
------------------------------

/agent/bin/installdependencies.sh: line 182: [: ==: unary operator expected
Can't detect current OS type base on /etc/os-release.
Can't install dotnet core dependencies.
You can manually install all required dependencies base on follwoing documentation
https://docs.microsoft.com/en-us/dotnet/core/linux-prerequisites?tabs=netcore2x

Dockerfile

#FROM microsoft/dotnet:2.1.4-runtime-alpine3.7
#FROM microsoft/dotnet:2.1.4-runtime-deps-alpine3.7
#FROM microsoft/dotnet:2.1.4-aspnetcore-runtime-alpine3.7

FROM microsoft/dotnet-nightly:3.0-runtime-alpine
MAINTAINER rjudin (lifeci)

#perisstent install
RUN  apk update; apk --update add \
     curl git \
     jq icu-libs libcurl \
     libunwind~=1.2 \
     netcat-openbsd~=1.130 \
     sudo~=1.8 bash~=4.4 \
     openssl
     #ca-certificates;

#temp install
RUN apk --update add --virtual build-dependencies

#temp install cleaning
RUN apk del build-dependencies; \
     rm -rf /var/cache/apk/*

#ARG VSTS_AGENT_VERSION='2.131.0'
ARG VSTS_AGENT_VERSION='2.140.0'
ARG VSTS_AGENT_URL="https://vstsagentpackage.azureedge.net/agent/${VSTS_AGENT_VERSION}/vsts-agent-linux-x64-${VSTS_AGENT_VERSION}.tar.gz"

RUN echo "VSTS_AGENT_URL is $VSTS_AGENT_URL"

RUN set -x \
 && curl -fSL $VSTS_AGENT_URL -o agent.tgz \
 && mkdir agent \
 && cd agent \
 && tar -xz --no-same-owner -f ../agent.tgz \
 && cd .. \
 && rm agent.tgz

COPY ./start-vsts.sh .
RUN chmod +x start-vsts.sh

RUN adduser vsts-user; mkdir /vsts; chown -R vsts-user:root /vsts;
#USER vsts-user
RUN ls -la /vsts; whoami

CMD ["./start-vsts.sh"]

Related (closed) issues: https://github.com/Microsoft/azure-pipelines-agent/issues/1319 https://github.com/dotnet/core/issues/226

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:17 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
mo-saeedcommented, Mar 4, 2021

Hi @vtbassmatt I am getting this error while I am using the steps here https://docs.microsoft.com/en-gb/azure/devops/pipelines/agents/docker?view=azure-devops with Alpine as base image

Error loading shared library ld-linux-x86-64.so.2: No such file or directory (needed by ./bin/libcoreclr.so)
Error relocating ./bin/libcoreclr.so: __finite: symbol not found
Error relocating ./bin/libcoreclr.so: __isnan: symbol not found
Error relocating ./bin/libcoreclr.so: __finitef: symbol not found
Error relocating ./bin/libcoreclr.so: __isnanf: symbol not found
Error relocating ./bin/libcoreclr.so: pthread_attr_setaffinity_np: symbol not found
Error relocating ./bin/System.Net.Http.Native.so: __strdup: symbol not found
libicu's dependencies missing for .NET Core 3.1
Execute ./bin/installdependencies.sh to install any missing dependencies.

Any workaround to fix this ?

0reactions
iuooipcommented, Feb 27, 2022

why binary wont run on alpine ?

/vsts/agent/bin # ./Agent.Listener
sh: ./Agent.Listener: not found

There is probably #!/bin/bash and Alpine doesn’t have that by default.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Install the .NET SDK or the .NET Runtime on Alpine
The ASP.NET Core Runtime allows you to run apps that were made with .NET that didn't provide the runtime. The following command installs...
Read more >
Missing symbols for dotnet core 3.1 (#14116) - alpine · GitLab
NET Core 3.1 Execute ./bin/installdependencies.sh to install any missing dependencies. There are multiple issues open on Github regarding this ...
Read more >
Install .NET 6 runtime on clean Alpine Linux - ag
NET 6 installers or sudo, so you have to install dependencies as admin ... Executing bash-5.1.16-r0.post-install (5/13) Installing libgcc ...
Read more >
How to resolve missing dependencies in Docker Alpine
At least one of the listed dependencies could not be resolved using an official package: #6 9.173 pdftk (no such package): #6 9.173...
Read more >
net sdk on alpine linux - docker
.NET Core on Alpine only works in .NET Core 2.1 and later. Do you have that version? If so, did you also consider...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found