Snap install breaks tooling on Ubuntu 18.04 LTS
See original GitHub issueAfter installing the most recent .NET Core SDK with snap
, there is an apparent mismatch between where tools are installed and where dotnet
looks for installed tools.
After installing a tool like dotnet ef
, the tool cannot be found by dotnet
, and the dotnet tool list
remains empty.
Steps to reproduce
First install the SDK:
sudo snap install dotnet-sdk --classic
sudo snap alias dotnet-sdk.dotnet dotnet
Then install tooling for EntityFrameworkCore (which should succeed):
dotnet tool install --global dotnet-ef
With a restarted session, even if the installation succeeded, the tool cannot be found:
dotnet ef --version
Could not execute because the specified command or file was not found.
Possible reasons for this include:
* You misspelled a built-in dotnet command.
* You intended to execute a .NET Core program, but dotnet-ef does not exist.
* You intended to run a global tool, but a dotnet-prefixed executable with this name could not be found on the PATH.
… and the tool listing remains empty:
dotnet tool list
Package Id Version Commands Manifest
---------------------------------------------------
While dotnet
cannot find the dotnet ef
tool, it has been installed in /home/user/.dotnet/tools
:
ls /home/${USER}/.dotnet/tools
dotnet-ef
… though this evidently isn’t where the snap-installation of dotnet
is expecting the tools to be installed.
While I’m sure there’s a good reason for going with snap
rather than apt-get
installations, at least having the option to install the 3.1.102 version using apt-get
would be a fitting workaround until the issue has been resolved.
System information:
- Ubuntu 18.04 LTS
- .NET Core SDK 3.1.102
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:8
Top GitHub Comments
Finally the following fixed everything;
It appears to work now.
Regrettably I haven’t looked too closely at this for a while. All I know is the above resolved my issues at the time.