본문 바로가기

TroubleShooting/Linux

.NET location: Not found 해결

728x90

.NET 런타임을 사용하는 프로그램을 실행했는데, 아래와 같은 .NET 을 못찾는다는 메시지와 함께 확인할 링크(https://aka.ms/dotnet/app-launch-failed) 를 알려준다.

$ pwd
/home/user1/myapp

$ ./myapp/myapp
You must install .NET to run this application.

App: /home/user1/myapp/myapp
Architecture: x64
App host version: 6.0.7
.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=osx.12-x64&apphost_version=6.0.7

 

https://aka.ms/dotnet/app-launch-failed 에서는 설치한 .NET 런타임(dotnet) 의 위치를 환경변수에 설정하라고 한다.

 

- env 명령어로 환경 변수 설정후 앱 실행

$ env DOTNET_ROOT=/user1/dotnet-runtime ./myapp/myapp
usage: myapp <executable-file> <output-directory>

 

- 환경설정 파일(.bashrc, .zshrc) 에 변수 추가 후 앱 실행

$ more .bashrc
export DOTNET_ROOT=/Users/web_admin/bas-analyzer/dotnet-runtime
export PATH=$PATH:$DOTNET_ROOT

$ ./myapp/myapp
usage: myapp <executable-file> <output-directory>

 

참고

https://learn.microsoft.com/ko-kr/dotnet/core/runtime-discovery/troubleshoot-app-launch?pivots=os-windows

 

앱 시작 실패 문제 해결 - .NET

앱 시작 실패의 일반적인 이유 및 가능한 솔루션에 대해 알아봅니다.

learn.microsoft.com


https://stackoverflow.com/questions/10566532/how-can-bash-execute-a-command-in-a-different-directory-context

 

How can Bash execute a command in a different directory context?

I have a common command that gets called from within very specific directories. There is only one executable sitting in /bin for this program, and the current working directory is very important for

stackoverflow.com