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

deskcheck1-0579 411 Reputation points

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: The period of time during which a program is being executed in a computer.
982 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Bruce ( 31,741 Reputation points

    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):

    export DOTNET_ROOT=$(pwd)/.dotnet
    mkdir -p "$DOTNET_ROOT" && tar zxf "$DOTNET_FILE" -C "$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.