Skip to content

Instantly share code, notes, and snippets.

@ball6847
Last active March 13, 2020 11:25
Show Gist options
  • Save ball6847/4f3b7685b564e40e51100ce7423977b5 to your computer and use it in GitHub Desktop.
Save ball6847/4f3b7685b564e40e51100ce7423977b5 to your computer and use it in GitHub Desktop.
# dotnet-install.sh
# follow the instuction here https://docs.microsoft.com/en-us/dotnet/core/tools/dotnet-install-script
# or if you dont want to read, then run
wget https://dot.net/v1/dotnet-install.sh
# make this file in our PATH, I already have my profile based PATH setup at ~/.local/bin
# then give it a permission to be executed
mv dotnet-install.sh ~/.local/bin
chmod +x ~/.local/bin/dotnet-install.sh
# install dotnet3.1 using dotnet-install.sh command, I prefer to keep my dotnet installation at ~/.dotnet
dotnet-install.sh --install-dir ~/.dotnet --channel 3.1
dotnet-install.sh --install-dir ~/.dotnet --channel 2.1
# check dotnet cli version, it will always use the most up-todate version of your installation
dotnet --version
# but now you have many dotnet sdk, to check the installed sdks
dotnet --list-sdks
# to install dotnet 1.1.x, we have to install it from arhive
# go to https://github.com/dotnet/core/blob/master/release-notes/download-archives/ and click at the version you want to download
# then pick the correct binaries for your platform, both SDK Binaries and Runtime Binaries
# open the archive and extract `host, sdk and shared` to ~/.dotnet directory but it's not ready yet, we still miss some system dependencies
# try this command, you will see what are missing.
find ~/.dotnet -name '*.so' -type f -print | xargs ldd | grep 'not found'
# try install some of dependencies that already available in ubuntu release
sudo apt install liblttng-ust0 libcurl4 libssl1.0.0 libkrb5-3 zlib1g libicu60
# if it's not enough to get all dependencies, you need to go to https://ubuntu.pkgs.org/ and search for that file, you will get the list of packages
# try searching for the file and go to package page, you will see a link to deb file in download section, just copy run the following command
# do this until you have all dependencies installed
wget http://archive.ubuntu.com/ubuntu/pool/main/i/icu/libicu55_55.1-7_amd64.deb
dpgk -i libicu55_55.1-7_amd64.deb
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment