PowerShell icon indicating copy to clipboard operation
PowerShell copied to clipboard

install.sh downloads binary for wrong architecture

Open WolfBublitz opened this issue 3 years ago • 1 comments

Prerequisites

Steps to reproduce

Take the following Dockerfile

FROM openSUSE/tumbleweed

RUN zipper --non-interactive install curl libicu htop vim && \
    zipper clean --all

RUN bash <(curl -s https://raw.githubusercontent.com/PowerShell/PowerShell/master/tools/install-powershell.sh)

and build it with:

docker buildx build --platform linux/arm64 --tag latest --load .

Expected behavior

A docker image with installed PowerShell for linux/arm64.

Actual behavior

The build fails because the install.sh script downloads PowerShell for amd64 instead of arm64.

Error details

#0 15.61 Destination file: powershell-7.3.4-linux-x64.tar.gz
#0 15.61 Source URL: https://github.com/PowerShell/PowerShell/releases/download/v7.3.4/powershell-7.3.4-linux-x64.tar.gz
#0 15.61   % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
#0 15.62                                  Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100 68.3M  100 68.3M    0     0  7620k      0  0:00:09  0:00:09 --:--:-- 9630k
#0 24.80 Installing PowerShell to /opt/microsoft/powershell/7.3.4 in overwrite mode
#0 26.80 qemu-x86_64: Could not open '/lib64/ld-linux-x86-64.so.2': No such file or directory
#0 26.80 ERROR: PowerShell failed to install!

Environment data

#0 0.361 Operating System Details:
#0 0.361   OS: linux
#0 0.361   DIST: 
#0 0.361   DistroBasedOn: suse
#0 0.361   PSUEDONAME: 
#0 0.361   REV: 20230604
#0 0.361   KERNEL: 5.15.49-linuxkit
#0 0.361   MACH: aarch64
#0 0.361   OSSTR:

Visuals

No response

WolfBublitz avatar Jun 14 '23 17:06 WolfBublitz

Conceptually related (afflicting http://aka.ms/install-powershell.ps1, the .ps1 "cousin" of http://aka.ms/install-powershell.sh:

  • #17663

mklement0 avatar Jun 14 '23 19:06 mklement0