question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Snap install breaks tooling on Ubuntu 18.04 LTS

See original GitHub issue

After 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:open
  • Created 4 years ago
  • Reactions:1
  • Comments:8

github_iconTop GitHub Comments

2reactions
Fosolcommented, Sep 18, 2020

Finally the following fixed everything;

export DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=1

It appears to work now.

1reaction
Fosolcommented, Jun 14, 2022

Regrettably I haven’t looked too closely at this for a while. All I know is the above resolved my issues at the time.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Snaps won't install in Ubuntu 18.04
I have a fresh installation of Ubuntu 18.04 and when I try to install any snaps from Ubuntu Software I invariably get the...
Read more >
Install breaktimer on Ubuntu using the Snap Store
Enable snaps on Ubuntu and install breaktimer. Snaps are applications packaged with all their dependencies to run on all popular Linux ...
Read more >
Broken dependency of content snaps during seeding - snapd
I think this means if you build a new 18.04 iso today it creates a seed that snapd can't handle because the latest...
Read more >
How to Fix Broken Packages in Ubuntu {4 Methods}
This article will show you how to troubleshoot and fix broken packages on Ubuntu using the available APT and DPKG tools.
Read more >
How to Install and Use Snap on Ubuntu 18.04
This guide is focused on setting up and using the snap commands. Installing Snap. In case you're using Ubuntu 16.04 LTS (Xenial Xerus)...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found