Last active
May 23, 2025 20:09
-
-
Save jhochwald/376ebc9ed3fa45bd27cec208fd0abb77 to your computer and use it in GitHub Desktop.
Install the PowerShell 7.3.8 binary release on a Debian ARM64 Linux box, or Debian ARM64 based WSL. There is no DEB package, yet!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# install the dependencies | |
apt install libc6 libgcc1 libgssapi-krb5-2 libicu72 libssl1.1 libstdc++6 zlib1g -y | |
# Get the .NET install script | |
wget https://dot.net/v1/dotnet-install.sh -O dotnet-install.sh | |
# Make it executable | |
chmod +x ./dotnet-install.sh | |
# Install the .NET SDK 7.0 (STS) for ARM64 | |
#./dotnet-install.sh --architecture arm64 --channel STS | |
# Install the .NET runtime 7.0 (STS) for ARM64 | |
./dotnet-install.sh --architecture arm64 --channel STS --runtime dotnet --dry-run | |
# When 8.0 is released, we should change the channel to LTS | |
# Set environment variables system-wide | |
tee /etc/profile.d/dotnet.sh <<EOF | |
export DOTNET_ROOT=$HOME/.dotnet | |
export PATH=$PATH:$DOTNET_ROOT:$DOTNET_ROOT/tools | |
EOF |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Install system components | |
sudo apt update && sudo apt install -y curl gnupg apt-transport-https wget | |
# Download the Microsoft Repository package | |
wget https://packages.microsoft.com/config/debian/12/packages-microsoft-prod.deb -O packages-microsoft-prod.deb | |
# Install the Microsoft Repository package | |
sudo dpkg -i packages-microsoft-prod.deb | |
# Remove the Microsoft Repository package | |
rm packages-microsoft-prod.deb | |
# Update APT (optional) | |
sudo apt update | |
# Download the powershell '.tar.gz' archive | |
curl -L -o /tmp/powershell.tar.gz https://github.com/PowerShell/PowerShell/releases/download/v7.3.8/powershell-7.3.8-linux-arm64.tar.gz | |
# Create the target folder where powershell will be placed | |
sudo mkdir -p /opt/microsoft/powershell/7 | |
# Expand powershell to the target folder | |
sudo tar zxf /tmp/powershell.tar.gz -C /opt/microsoft/powershell/7 | |
# Set execute permissions | |
sudo chmod +x /opt/microsoft/powershell/7/pwsh | |
# Create the symbolic link that points to pwsh | |
sudo ln -s /opt/microsoft/powershell/7/pwsh /usr/bin/pwsh |
also the 'current' version for powershell is https://github.com/PowerShell/PowerShell/releases/download/v7.5.0/powershell-7.5.0-linux-arm64.tar.gz
and you DO need libicu72!
for powershell. .net stuff works as well, but most of the package version don't seem current.
I no longer update this script, because I use only use Ansible to Install/Update PowerShell and .NET since a while now. But feel free to adopt it ;-)
what is the link to the ansible thing?
what is the link to the ansible thing?
https://fra1dsds01.corp.enatec.group:3000/joerg.hochwald/ENFRA1
Sorry, couldn't resist ;-)
Honestly: Nothing from the Ansible is published yet.
I still consider if I should publich at least some of the playbooks.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
a lot of these packages don't seem to work on debian 12, but most of your directions work!