Good afternoon. Dotnet 6 was correctly installed on Ubuntu 20.04.4 LTS.
dotnet --version
6.0.400
Then, using the command, installed the utility dotnet-dump.
dotnet tool install --global dotnet-dump
Next, using the command, I try to get the version of the utility and I have an error:
dotnet-dump --version
dotnet-dump: command not found
If you try to install the utility again, you get a message that it is already installed:
dotnet tool install --global dotnet-dump
The dotnet-dump tool is already installed.
Question:
How do I fix this situation?
P.S.: The installation I carried out on the basis of the article enter link description here
CodePudding user response:
Ensure global tools dir is on the PATH
export PATH="$PATH:$HOME/.dotnet/tools"
CodePudding user response:
Here is a list of steps to solve the problem:
1.Remove dotnet-dump utility;
dotnet tool uninstall --global dotnet-dump
Note - I installed the utility globally, so the --global attribute is set when uninstalling.
2.Remove dotnet
sudo snap remove --purge dotnet-sdk
sudo apt remove --purge dotnet-runtime
Note - Deleted in this way because it installed using the snap utility.
3.Installed dotnet using a script dotnet-install.sh (enter link description here)
3.1 I give all rights (including execution) to the script file
chmod ugo rwx dotnet-install.sh
ls -l
3.2 I run the script for execution
./dotnet-install.sh -c current
Note - In this case, -with current means that the latest SDK will be installed
3.3 Add the following text to .bashrc files and .bash_profile:
export DOTNET_ROOT=$HOME/.dotnet
export PATH=$PATH:$DOTNET_ROOT:$DOTNET_ROOT/tools
by executing the following commands:
gedit ~/.bashrc
gedit ~/.bash_profile
4.Checking the version of the utility
dotnet-dump --version