Skip to content

Commit

Permalink
install from source: manually install dotnet on Ubuntu/Debian
Browse files Browse the repository at this point in the history
The dotnet team recently added support for installing natively from Jammy feeds on
Ubuntu:

dotnet/core#7699

This caused our current installation to fail, as it caused conflicts with
the packages.microsoft.com feed we use in the install from source script
for Debian/Ubuntu.

This change separates the Ubuntu and Debian install from source
processes, since Debian does not natively support Jammy feeds and continuing to try to
install from packages.microsoft.com on Ubuntu would require munging the
priority of feeds, which users would likely not appreciate.

fixes
  • Loading branch information
ldennington committed Aug 15, 2022
1 parent a9fcb46 commit 4267250
Showing 1 changed file with 1 addition and 23 deletions.
24 changes: 1 addition & 23 deletions src/linux/Packaging.Linux/install-from-source.sh
Original file line number Diff line number Diff line change
Expand Up @@ -116,29 +116,7 @@ fi
eval "$(sed -n 's/^ID=/distribution=/p' /etc/os-release)"
eval "$(sed -n 's/^VERSION_ID=/version=/p' /etc/os-release | tr -d '"')"
case "$distribution" in
debian | ubuntu)
$sudo_cmd apt update
install_shared_packages apt install

# add dotnet package repository/signing key
$sudo_cmd apt update && $sudo_cmd apt install wget -y
curl -LO https://packages.microsoft.com/config/"$distribution"/"$version"/packages-microsoft-prod.deb
$sudo_cmd dpkg -i packages-microsoft-prod.deb
rm packages-microsoft-prod.deb

# proactively install tzdata to prevent prompts
export DEBIAN_FRONTEND=noninteractive
$sudo_cmd apt install -y --no-install-recommends tzdata

# install dotnet packages and dependencies if needed
if [ -z "$(verify_existing_dotnet_installation)" ]; then
$sudo_cmd apt update
$sudo_cmd apt install apt-transport-https -y
$sudo_cmd apt update
$sudo_cmd apt install dotnet-sdk-6.0 dpkg-dev -y
fi
;;
linuxmint)
debian | ubuntu | linuxmint)
$sudo_cmd apt update
install_shared_packages apt install

Expand Down

0 comments on commit 4267250

Please sign in to comment.