How to install the runtime version of .netcore3.1 on Linux CentOs

deskcheck1-0579 411 Reputation points
2022-02-14T19:27:46.307+00:00

I deployed a .netcore 3.1.22 stand-alone executable on Linux CentOS machine.

I then downloaded the "dotnet-runtime-3.1.22-linux-x64.tar.gz" and copied it to Linux machine.

Does un-zipping the runtime file install the runtime version to Linux? Or, do I have to issue any other command to install this as a module in Linux?

When I run my executable it gives an error, "Permission denied". So I thought, the runtime version is probably not yet installed.

Appreciate any help.

.NET Runtime
.NET Runtime
.NET: Microsoft Technologies based on the .NET software framework.Runtime: An environment required to run apps that aren't compiled to machine language.
1,126 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Bruce (SqlWork.com) 57,166 Reputation points
    2022-02-14T23:19:55.35+00:00

    you don't say which version of Centos you are using. You can use a page manager, os 7, than yum, if 8 the dnf

    look like you are doing a manual install from the tar file. the docs say (bash shell):

    DOTNET_FILE=dotnet-sdk-6.0.100-linux-x64.tar.gz
    export DOTNET_ROOT=$(pwd)/.dotnet
    
    mkdir -p "$DOTNET_ROOT" && tar zxf "$DOTNET_FILE" -C "$DOTNET_ROOT"
    
    export PATH=$PATH:$DOTNET_ROOT
    

    basically you are extracting the files, and adding the folder to the path.

    linux does not use .exe, so there should not be one (its windows only). the build will create a folder with all required files in the folder. it will create a <appname> file in the folder with execute permission, that you run via the shell. you can also use dotnet to run the dll.

    0 comments No comments