Skip to content

Installation on Alpine misses some prerequisites, so dotnet won't run #72

Closed
@danmoseley

Description

@danmoseley

Alpine 3.11.3 on WSL2

danmose3:~/git/tmp# cat /etc/os-release
NAME="Alpine Linux"
ID=alpine
VERSION_ID=3.11.3
PRETTY_NAME="Alpine Linux v3.11"
HOME_URL="https://alpinelinux.org/"
BUG_REPORT_URL="https://bugs.alpinelinux.org/"

Installing 5.0 with dotnet-install.sh leaves me with a broken dotnet:

[2020/08/20 21:03:10][INFO] $ /root/git/performance/tools/dotnet/x64/dotnet-install.sh -InstallDir /root/git/performance/tools/dotnet/x64 -Architecture x64 -Channel master
[2020/08/20 21:03:11][INFO] dotnet_install: Warning: Unable to locate libintl. Probable prerequisite missing; install libintl (or gettext).
[2020/08/20 21:03:11][INFO] dotnet_install: Warning: Unable to locate zlib. Probable prerequisite missing; install zlib.
[2020/08/20 21:03:11][INFO] dotnet_install: Warning: Unable to locate libicu. Probable prerequisite missing; install libicu.
[2020/08/20 21:03:11][INFO] dotnet_install: Warning: Unable to locate liblttng. Probable prerequisite missing; install libcurl.
[2020/08/20 21:03:11][INFO] dotnet-install: Downloading link: https://dotnetcli.azureedge.net/dotnet/Sdk/5.0.100-rc.1.20420.14/dotnet-sdk-5.0.100-rc.1.20420.14-linux-musl-x64.tar.gz
...
[2020/08/20 21:03:14][INFO]
[2020/08/20 21:03:15][INFO] dotnet-install: Extracting zip from https://dotnetcli.azureedge.net/dotnet/Sdk/5.0.100-rc.1.20420.14/dotnet-sdk-5.0.100-rc.1.20420.14-linux-musl-x64.tar.gz
[2020/08/20 21:03:18][INFO] dotnet-install: Adding to current process PATH: `/root/git/performance/tools/dotnet/x64`. Note: This change will be visible only when sourcing script.
[2020/08/20 21:03:18][INFO] dotnet-install: Installation finished successfully.
...
[2020/08/20 21:03:26][INFO] $ dotnet --info
[2020/08/20 21:03:26][INFO] Error loading shared library libstdc++.so.6: No such file or directory (needed by /root/git/performance/tools/dotnet/x64/dotnet)
[2020/08/20 21:03:26][INFO] Error loading shared library libgcc_s.so.1: No such file or directory (needed by /root/git/performance/tools/dotnet/x64/dotnet)
[2020/08/20 21:03:26][INFO] Error relocating /root/git/performance/tools/dotnet/x64/dotnet: _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7reserveEm: symbol not found
[2020/08/20 21:03:26][INFO] Error relocating /root/git/performance/tools/dotnet/x64/dotnet: _ZNKSt5ctypeIcE13_M_widen_initEv: symbol not found
[2020/08/20 21:03:26][INFO] Error relocating /root/git/performance/tools/dotnet/x64/dotnet: _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE14_M_replace_auxEmmmc: symbol not found
.. etc...

By running these commands, I fixed it:

danmose3:~/git/tmp# apk add libstdc++
danmose3:~/git/tmp# apk add libgcc

BUG: It should warn me that libstdc++ and libgcc are missing since apparently these are required for dotnet to run on Alpine.

POSSIBLE OTHER ISSUE: When I try to install the prerequisites it does recommend, two don't install:

danmose3:~/git/tmp# apk add libintl zlib libicu liblttng
ERROR: unsatisfiable constraints:
  libicu (missing):
    required by: world[libicu]
  liblttng (missing):
    required by: world[liblttng]

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions