dotnet command not found after upgrade to 5.0.403
- Dominant language
- PowerShell
- Stars
- 22k
- Forks
- 4.9k
- Avg merge
- 5d 5h
- Merged PRs (30d)
- 29
Description
### Description
When updating to 5.0.403 on CentOS 7, in my case from 5.0.402 it is removing the link from /usr/bin causing the dotnet command to no longer be found. This happened in production but can replicate locally too. Update was done through yum.
bash: dotnet: command not found...
Workaround: Call dotnet directly from install location /usr/share/dotnet/dotnet or recreate the link from /usr/share/dotnet/dotnet -> /usr/bin/dotnet and set as executable.
Recreate link:
ln -s /usr/share/dotnet/dotnet /usr/bin/dotnet
chmod +x /usr/bin/dotnet
### Configuration
## PRE-UPGRADE (info)
.NET SDK (reflecting any global.json):
Version: 5.0.402
Commit: e9d3381880
Runtime Environment:
OS Name: centos
OS Version: 7
OS Platform: Linux
RID: centos.7-x64
Base Path: /usr/share/dotnet/sdk/5.0.402/
Host (useful for support):
Version: 5.0.11
Commit: f431858f8b
.NET SDKs installed:
5.0.402 [/usr/share/dotnet/sdk]
.NET runtimes installed:
Microsoft.AspNetCore.App 5.0.11 [/usr/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.NETCore.App 5.0.11 [/usr/share/dotnet/shared/Microsoft.NETCore.App]
To install additional .NET runtimes or SDKs:
https://aka.ms/dotnet-download
[shawken@localhost ~]$ dotnet --info
.NET SDK (reflecting any global.json):
Version: 5.0.402
Commit: e9d3381880
Runtime Environment:
OS Name: centos
OS Version: 7
OS Platform: Linux
RID: centos.7-x64
Base Path: /usr/share/dotnet/sdk/5.0.402/
Host (useful for support):
Version: 5.0.11
Commit: f431858f8b
.NET SDKs installed:
5.0.402 [/usr/share/dotnet/sdk]
.NET runtimes installed:
Microsoft.AspNetCore.App 5.0.11 [/usr/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.NETCore.App 5.0.11 [/usr/share/dotnet/shared/Microsoft.NETCore.App]
To install additional .NET runtimes or SDKs:
https://aka.ms/dotnet-download
## POST-UPGRADE (info)
.NET SDK (reflecting any global.json):
Version: 5.0.403
Commit: bf9d168ac2
Runtime Environment:
OS Name: centos
OS Version: 7
OS Platform: Linux
RID: centos.7-x64
Base Path: /usr/share/dotnet/sdk/5.0.403/
Host (useful for support):
Version: 5.0.12
Commit: 7211aa01b3
.NET SDKs installed:
5.0.403 [/usr/share/dotnet/sdk]
.NET runtimes installed:
Microsoft.AspNetCore.App 5.0.12 [/usr/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.NETCore.App 5.0.12 [/usr/share/dotnet/shared/Microsoft.NETCore.App]
To install additional .NET runtimes or SDKs:
https://aka.ms/dotnet-download
### Regression?
### Other information
Contributor guide
Assessment
This issue has not been assessed yet.