Raspberry Pi 4 installed net core3.0 environment

Official Raspberry Pi 4 32 system is the system, so you need to install arm32 version of the runtime and net core sk

1, first create a folder dotnet-arm32

sudo mkdir dotnet arm32

2, download sdk and runtime

wget https://download.visualstudio.microsoft.com/download/pr/0b30374c-3d52-45ad-b4e5-9a39d0bf5bf0/deb17f7b32968b3a2186650711456152/dotnet-sdk-3.0.101-linux-arm.tar.gz

wget https://download.visualstudio.microsoft.com/download/pr/57bf6ac3-1712-4b36-bfab-80b31d7ce21e/1ca71849902d73eb083bcc2c2f4d8f4f/aspnetcore-runtime-3.0.1-linux-arm.tar.gz

3, the sdk and runtime extract to dotnet-arm32 folder

tar zxf aspnetcore-runtime-3.0.1-linux-arm.tar.gz -C $HOME/dotnet

tar zxf dotnet-sdk-3.0.101-linux-arm.tar.gz -C $HOME/dotnet

4, configure the environment variables

So far, you can only dotnet-arm32 execute commands in .NET. Let dotnet command can be run at any position, we need to create an environment variable connection point dotnet-arm32 folder.

export DOTNET_ROOT=$HOME/dotnet-arm32

export PATH=$PATH:$HOME/dotnet-arm32

5, boot

Raspbian system to execute .profile file commands at startup. So we just need to configure the command environment variables can be added to the .profile file

Use nano editor, open the file .profile

sudo nano .profile

At the end of the file is added

#set net core sdk and runtime path

export DOTNET_ROOT=$HOME/dotnet-arm32

export PATH=$PATH:$HOME/dotnet-arm32

Guess you like

Origin www.cnblogs.com/yushuo/p/11973202.html