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.

dotnet-install.sh doesn't work on Alpine Linux v3.7

See original GitHub issue

Steps to reproduce

docker run -it alpine:latest

# in container
apk update
apk add curl bash

curl -O https://raw.githubusercontent.com/dotnet/cli/master/scripts/obtain/dotnet-install.sh
chmod 777 dotnet-install.sh
./dotnet-install.sh

# errors
dotnet_install: Error: Unable to locate libunwind. Install libunwind to continue
dotnet_install: Error: Unable to locate libssl. Install libssl to continue
dotnet_install: Error: Unable to locate libicu. Install libicu to continue
dotnet_install: Error: Unable to locate libcurl. Install libcurl to continue

apk add libunwind-dev openssl-dev icu-libs curl-dev
./dotnet-install.sh


# same errors
dotnet_install: Error: Unable to locate libunwind. Install libunwind to continue
dotnet_install: Error: Unable to locate libssl. Install libssl to continue
dotnet_install: Error: Unable to locate libicu. Install libicu to continue
dotnet_install: Error: Unable to locate libcurl. Install libcurl to continue

Expected behavior

it installs dotnet.

Actual behavior

it doesn’t install dotnet. Reason is we are using /sbin/ldconfig, which on alpine does not locate the installed libs (although i can find all of these under /usr/bin). According to maintainers in alpine’s IRC channel (cc @ncopa), this script is not meant to locate the libs reliably (but its purpose is to create some symlinks). The correct way is to use scanelf -qS /usr/lib | grep libunwind etc.

Workaround

Manually install dotnet from tarball as described here: https://github.com/PowerShell/PowerShell/pull/6367#issuecomment-372765035

Environment data

alpine linux 3.7

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
johnbeisnercommented, Mar 16, 2018

@omajid “Perhaps we should add a flag to dotnet-install.sh to not check for pre-requisites” - try “export DOTNET_INSTALL_SKIP_PREREQS=1”

0reactions
ghostcommented, Mar 15, 2018

@janvorli, for your info. I spent sometime chatting with Alpine packaging folks to know how they see ldconfig, they gave me the above mentioned pointers (with explanation from me). The proposal in the linked / duplicated issue can work, but IMO can be revised a bit based on how other products requiring ldconfig have managed to support Alpine. Thanks!

Read more comments on GitHub >

github_iconTop Results From Across the Web

dotnet-install.sh doesn't work on Alpine Linux v3.7 #9171
Actual behavior. it doesn't install dotnet. Reason is we are using /sbin/ldconfig, which on alpine does not locate the installed libs ( ...
Read more >
jenkins - dotnet not found in alpine docker
When I use volumes in the yml file, seems like the dotnet sdk instalation is getting lost. When I don't use volumes, dotnet...
Read more >
Install .NET 6 runtime on clean Alpine Linux - ag
I will start with a completely clean, stock Alpine distro. Install. Dependencies. Alpine does not have .NET 6 installers or sudo, ...
Read more >
Install .NET on Linux without using a package manager
Demonstrates how to install the .NET SDK and the .NET Runtime on Linux without a package manager. Use the install script or manually...
Read more >
How To Install Microsoft .NET Core SDK On Linux
NET SDK in Alpine Linux. To install .NET SDK in Alpine Linux, run: $ sudo apk add dotnet7-sdk. Install ASP.NET Core Runtime in...
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