Problem: Running .net core 3.1 app on a Raspberry Pi returns
" "
check
dotnet --version
echo $DOTNET_ROOT
if the second line is empty then the environment variable needs to be set at startup.
Add a file set_dotnetroot.sh to /etc/profile.d
sudo nano /etc/profile.d/set_dotnet.sh
add
export DOTNET_ROOT="/opt/dotnet"
save and reboot
If you want it to run for su too, especially if running a su crontab,
edit /etc/bash.bashrc and add it there too.
No comments:
Post a Comment