How to install old version of dotnet version in linux - linux

The currently guide to install dotnet in linux here:
https://www.microsoft.com/net/download/linux-package-manager/ubuntu16-04/sdk-2.1.300
It will install the latest version of dotnet in linux, but my previous application running at dotnet version 1.1.2 so How can I install the old version of dotnet core and run it?
Thanks.

You can get .NET Core 1.1.4 via sudo apt-get install dotnet-dev-1.1.4 instead of sudo apt-get install dotnet-sdk-2.1. Try apt-cache search dotnet to see all the SDK (sdk, -dev) and other .NET Core packages that are available for your distribution.

The newer versions it seems we have to manually download them. For example, I needed to get 2.1.403. Here's where to do that:
https://github.com/dotnet/core/blob/master/release-notes/download-archive.md
Originally found via this Q&A:
Where to download previous version of .net core sdk?
Be careful to only pull out the 'sdk' portion from the tar.gz, don't overwrite your newer dotnet executable!

Related

CentOS .NET Core 6.0 installs wrong runtime version

These are 2 commands I ran trying to install .net core 6.0 on CentOS 8 Stream:
sudo dnf install dotnet-runtime-6.0
Last metadata expiration check: 0:12:04 ago on Tue 23 Nov 2021 17:38:47 UTC.
. . .
Installed:
dotnet-host-6.0.0-0.6.28be3e9a006d90d8c6e87d4353b77882829df718.el8.x86_64
dotnet-hostfxr-6.0-6.0.0-0.6.28be3e9a006d90d8c6e87d4353b77882829df718.el8.x86_64
dotnet-runtime-6.0-6.0.0-0.6.28be3e9a006d90d8c6e87d4353b77882829df718.el8.x86_64
lttng-ust-2.8.1-11.el8.x86_64
userspace-rcu-0.10.1-4.el8.x86_64
Complete!
[/usr/local/bin]$ dotnet --list-runtimes
Microsoft.NETCore.App 6.0.0-rc.2.21470.23 [/usr/lib64/dotnet/shared/Microsoft.NETCore.App]
Install says it installed 6.0.0-0.6 but the actual version is 6.0.0-rc.2.21470.23 and my app is failing with error:
It was not possible to find any compatible framework version
The framework 'Microsoft.NETCore.App', version '6.0.0' (x64) was not found.
- The following frameworks were found:
6.0.0-rc.2.21470.23 at [/usr/lib64/dotnet/shared/Microsoft.NETCore.App]
Can it be fixed without manual .net install ?
SOLUTION (worked)
add repo to the OS:
sudo rpm -Uvh https://packages.microsoft.com/config/centos/8/packages-microsoft-prod.rpm
change it priority to preceed the OS:
echo 'priority=50' | sudo tee -a /etc/yum.repos.d/microsoft-prod.repo
install
sudo dnf install dotnet-runtime-6.0
reboot the machine
CentOS 8 Stream seems to have an out-of-date version of .NET 6.
That the version is old is kind of my fault; I need to update the package in CentOS Stream 8 (which really copies what's in RHEL 8.6 and that's the one I will fix).
The version showed by dotnet --info is correct.
The RPM package versioning is a workaround in that CentOS (and RHEL and Fedora until recently) don't have a way of reflecting pre-release versions of an upstream that is about to a release 6.0. We are forced to use a version "6.0" and Release with "0.X" to say "this is a pre-release of 6.0". I could have called it "6.0-0.6.rc2", but this build isn't even exact "6.0 RC2", it was a pre-RC2 snaphost (commit 28be3e9a006d90d8c6e87d4353b77882829df718 from dotnet/installer repository).
If you urgently need .NET 6, here are some options to consider:
If you need a container, try out registry.access.redhat.com/ubi8/dotnet-60-runtime.
Use a manual (not package) install of .NET 6: https://learn.microsoft.com/en-us/dotnet/core/install/linux-scripted-manual#manual-install
Add the Microsoft RPM repository (repo file) and then use solution 3 to make sure it take precedence over the CentOS repository.

Hugo version not updating to latest

I am trying to work with the Hugo static site generator.
Problem: Hugo is saying it is updated to the latest version but it is not.
$ hugo version
Hugo Static Site Generator v0.40.1 linux/amd64 BuildDate: 2018-04-25T17:16:11Z
But the latest version is now v0.70.0
System:
Windows Subsystem for Linux via the terminal in Visual Studio Code v1.45.0
Any help would be much appreciated thank you all.
If you're using a Debian-based system, e.g. Ubuntu, you can download the appropriate .deb from https://github.com/gohugoio/hugo/releases and install it with, for example:
sudo dpkg --install ./hugo_extended_0.70.0_Linux-64bit.deb
I wrote about this in footnote 10 in my Hugo Tutorial.
If you've installed it via the apt package manager, you might be out of luck there, because the official repositories might not be up to date with the latest version of Hugo.
To update the repositories and install the latest available version of hugo, try doing
sudo apt update
sudo apt install hugo
However, I see it's only getting version 0.6x.
If you want to use it on Windows, you could try installing it via Chocolatey or Scoop. Both seem to have version 0.70.x in their repositories, but you'd need to install them first, because they're not Windows out-of-the-box software. Not sure if and how it would work if you use it in the WSL, though.
Otherwise, there's always the good'ol download the binary and save it.
The Ubuntu package manager "apt" does not contain the latest version of Hugo right now. It needs to be updated by the repo owner or similar.
I solved my problem by following a binary install guide here

Maven latest version installation UBuntu 16 without using "wget"

Is there any way to install latest Maven specific version without using wget command in ubuntu 16.
You could try doing what my link below recommends, but add references to Bionic instead of Xenial. Then all you need to do is sudo apt install maven.
Note the current version of support Maven for Ubuntu 18.04 (Bionic) is 3.6.0-1, so if that isn't new enough for you (the latest Maven release is 3.6.2), you'll have to find another way.
https://medium.com/#george.shuklin/how-to-install-packages-from-a-newer-distribution-without-installing-unwanted-6584fa93208f
you could install sdkman on the machine 1st and then use it to install and manage various java-related tools (maven among them), but installing sdkman itself likely involves a wget

How to install the latest version of NuGet.exe CLI in Ubuntu 18.04 WSL?

I have WSL 18.04 (Ubuntu) and I want to use NuGet.exe to install a Nuget Package to a folder (not .csproj) using the code below:
nuget install Test.Nuget.Version -OutputDirectory packages
In WSL, I use sudo apt install nuget. However that will only install an old nuget version 2.8.xxx in Ubuntu. =(
In order to run nuget install command, I must use the latest version of NuGet version (5.x.x) installed in Ubuntu.
Is it possible to install latest NuGet version in Ubuntu?
If yes, how can I do so?
Normally you can get nuget to update itself:
nuget.exe update -self
However recently, because I assume they have updated the min TLS version, one can get the following error:
The authentication or decryption has failed.
Error while sending TLS Alert (Fatal:InternalError): System.IO.IOException:
So your nuget version has to be new enough to upgrade itself.
So you have to get a new nuget.exe by alternative means:
curl https://dist.nuget.org/win-x86-commandline/latest/nuget.exe -o nuget.exe

How to install Kubernetes from release binary

I'm trying to run Kubernetes on a local Centos server and have had some issues (for example, with DNS). A version check shows that I'm running Kubernetes 1.2 Alpha 1. Since the full release is now available from the Releases Download page, I'd like to upgrade and see if that resolves my issue. The documentation for installing a prebuilt binary release states:
Download the latest release and unpack this tar file on Linux or OS X, cd to the created kubernetes/ directory, and then follow the getting started guide for your cloud.
However, the Getting Started Guide for Centos says nothing about using a prebuilt binary. Instead, it tells you to set up a yum repo and run a yum install command:
yum -y install --enablerepo=virt7-docker-common-release kubernetes
This command downloads and installs the Alpha1 release. In addition, it attempts to install Docker 1.8 (two releases down from the current 1.10), which fails if Docker is already installed.
How can I install from a prebuilt binary and use an existing Docker?
According to the Table of Solutions for installing Kubernetes, the maintainer of the CentOS getting started guide is #coolsvap. You should reach out to him to ask about getting the pre-built binary updated to the official release.

Resources