Skip to content

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

@ghost

Description

@ghost

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: PowerShell/PowerShell#6367 (comment)

Environment data

alpine linux 3.7

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions