Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

".NET location: Not found" after following installation instructions on Ubuntu 22.04.1 #1011

Closed
masto opened this issue Jan 1, 2023 · 2 comments
Labels
bug A bug in Git Credential Manager dotnet-tool Related to the dotnet tool installation method external Relating to an external partner, team, or library installation Specific to installation and uninstallation .NET Pull requests that update .NET code

Comments

@masto
Copy link

masto commented Jan 1, 2023

I don't know how to proceed from here. I think I've done everything just like it says on the tin. All the dependencies are there. What does it want from me?

❯ sudo apt-get -qq install dotnet-sdk-6.0
Selecting previously unselected package dotnet-host.
(Reading database ... 116885 files and directories currently installed.)
Preparing to unpack .../0-dotnet-host_6.0.111-0ubuntu1~22.04.1_amd64.deb ...
Unpacking dotnet-host (6.0.111-0ubuntu1~22.04.1) ...
Selecting previously unselected package dotnet-hostfxr-6.0.
Preparing to unpack .../1-dotnet-hostfxr-6.0_6.0.111-0ubuntu1~22.04.1_amd64.deb ...
Unpacking dotnet-hostfxr-6.0 (6.0.111-0ubuntu1~22.04.1) ...
Selecting previously unselected package dotnet-runtime-6.0.
Preparing to unpack .../2-dotnet-runtime-6.0_6.0.111-0ubuntu1~22.04.1_amd64.deb ...
Unpacking dotnet-runtime-6.0 (6.0.111-0ubuntu1~22.04.1) ...
Selecting previously unselected package aspnetcore-runtime-6.0.
Preparing to unpack .../3-aspnetcore-runtime-6.0_6.0.111-0ubuntu1~22.04.1_amd64.deb ...
Unpacking aspnetcore-runtime-6.0 (6.0.111-0ubuntu1~22.04.1) ...
Selecting previously unselected package dotnet-apphost-pack-6.0.
Preparing to unpack .../4-dotnet-apphost-pack-6.0_6.0.111-0ubuntu1~22.04.1_amd64.deb ...
Unpacking dotnet-apphost-pack-6.0 (6.0.111-0ubuntu1~22.04.1) ...
Selecting previously unselected package dotnet-targeting-pack-6.0.
Preparing to unpack .../5-dotnet-targeting-pack-6.0_6.0.111-0ubuntu1~22.04.1_amd64.deb ...
Unpacking dotnet-targeting-pack-6.0 (6.0.111-0ubuntu1~22.04.1) ...
Selecting previously unselected package dotnet-templates-6.0.
Preparing to unpack .../6-dotnet-templates-6.0_6.0.111-0ubuntu1~22.04.1_amd64.deb ...
Unpacking dotnet-templates-6.0 (6.0.111-0ubuntu1~22.04.1) ...
Selecting previously unselected package dotnet-sdk-6.0.
Preparing to unpack .../7-dotnet-sdk-6.0_6.0.111-0ubuntu1~22.04.1_amd64.deb ...
Unpacking dotnet-sdk-6.0 (6.0.111-0ubuntu1~22.04.1) ...
Setting up dotnet-host (6.0.111-0ubuntu1~22.04.1) ...
Setting up dotnet-apphost-pack-6.0 (6.0.111-0ubuntu1~22.04.1) ...
Setting up dotnet-targeting-pack-6.0 (6.0.111-0ubuntu1~22.04.1) ...
Setting up dotnet-hostfxr-6.0 (6.0.111-0ubuntu1~22.04.1) ...
Setting up dotnet-templates-6.0 (6.0.111-0ubuntu1~22.04.1) ...
Setting up dotnet-runtime-6.0 (6.0.111-0ubuntu1~22.04.1) ...
Setting up aspnetcore-runtime-6.0 (6.0.111-0ubuntu1~22.04.1) ...
Setting up dotnet-sdk-6.0 (6.0.111-0ubuntu1~22.04.1) ...
Processing triggers for man-db (2.10.2-1) ...
Scanning processes...                                                                                                                          
Scanning linux images...                                                                                                                       

Running kernel seems to be up-to-date.

No services need to be restarted.

No containers need to be restarted.

No user sessions are running outdated binaries.

No VM guests are running outdated hypervisor (qemu) binaries on this host.
❯ dotnet tool install -g git-credential-manager

Welcome to .NET 6.0!
---------------------
SDK Version: 6.0.111

----------------
Installed an ASP.NET Core HTTPS development certificate.
To trust the certificate run 'dotnet dev-certs https --trust' (Windows and macOS only).
Learn about HTTPS: https://aka.ms/dotnet-https
----------------
Write your first app: https://aka.ms/dotnet-hello-world
Find out what's new: https://aka.ms/dotnet-whats-new
Explore documentation: https://aka.ms/dotnet-docs
Report issues and find source on GitHub: https://github.com/dotnet/core
Use 'dotnet --help' to see available commands or visit: https://aka.ms/dotnet-cli
--------------------------------------------------------------------------------------
You can invoke the tool using the following command: git-credential-manager
Tool 'git-credential-manager' (version '2.0.886') was successfully installed.
❯ echo $DOTNET_ROOT
/home/chris/.dotnet
❯ dotnet --list-runtimes
Microsoft.AspNetCore.App 6.0.11 [/usr/lib/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.NETCore.App 6.0.11 [/usr/lib/dotnet/shared/Microsoft.NETCore.App]
❯ dotnet --list-sdks
6.0.111 [/usr/lib/dotnet/sdk]
❯ git-credential-manager configure
You must install .NET to run this application.

App: /home/chris/.dotnet/tools/git-credential-manager
Architecture: x64
App host version: 6.0.11
.NET location: Not found

Learn about runtime installation:
https://aka.ms/dotnet/app-launch-failed

Download the .NET runtime:
https://aka.ms/dotnet-core-applaunch?missing_runtime=true&arch=x64&rid=ubuntu.22.04-x64&apphost_version=6.0.11
❯ uname -a
Linux linoodle 5.15.0-56-generic #62-Ubuntu SMP Tue Nov 22 19:54:14 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
❯ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 22.04.1 LTS
Release:        22.04
Codename:       jammy
@mjcheetham
Copy link
Collaborator

Hello @masto, thanks for reporting this.

This looks to be a .NET SDK installation bug: dotnet/runtime#79237

From reading the comments in that issue it appears that the $DOTNET_ROOT may be set incorrectly and should be /usr/lib/dotnet instead. Do you have a .profile or .bashrc that is setting DOTNET_ROOT to /home/chris/.dotnet explicitly?

What happens if you set it to /usr/lib/dotnet?

@mjcheetham mjcheetham added bug A bug in Git Credential Manager installation Specific to installation and uninstallation external Relating to an external partner, team, or library .NET Pull requests that update .NET code dotnet-tool Related to the dotnet tool installation method labels Jan 3, 2023
@masto
Copy link
Author

masto commented Jan 4, 2023

Thanks! Setting DOTNET_ROOT=/usr/lib/dotnet works, and that makes sense given that I installed the apt package. I had copied that environment setting along from another machine where I guess I installed it in my home directory.

I will follow up on the issue you referenced, as there is a bit of an issue with zsh.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A bug in Git Credential Manager dotnet-tool Related to the dotnet tool installation method external Relating to an external partner, team, or library installation Specific to installation and uninstallation .NET Pull requests that update .NET code
Projects
None yet
Development

No branches or pull requests

2 participants