Linux下dotnet启动It was not possible to find any compatible framework version
场景描述在Linux (CentOS7)环境下输入指令运行dotnet项目:/usr/bin/dotnet /wwwroot/workwx/api/SW.Wecom.Web.Entry.dll --urls http://*:6677出现如下错误提示:It was not possible to find any compatible framework versionThe framework
场景描述
在Linux (CentOS7)环境下输入指令运行dotnet项目:/usr/bin/dotnet /wwwroot/workwx/api/SW.Wecom.Web.Entry.dll --urls http://*:6677
出现如下错误提示:
It was not possible to find any compatible framework version
The framework ‘Microsoft.NETCore.App’, version ‘6.0.0’ was not found.
- The following frameworks were found:
2.0.4 at [/usr/share/dotnet/shared/Microsoft.NETCore.App]
3.1.12 at [/usr/share/dotnet/shared/Microsoft.NETCore.App]
5.0.11 at [/usr/share/dotnet/shared/Microsoft.NETCore.App]
You can resolve the problem by installing the specified framework and/or SDK.
The specified framework can be found at:
- https://aka.ms/dotnet-core-applaunch?framework=Microsoft.NETCore.App&framework_version=6.0.0&arch=x64&rid=centos.7-x64
解决思路
他说我缺了.NET6的环境,那就去验证下是不是真缺了。切换到路径:cd /usr/share/dotnet/shared/Microsoft.NETCore.App
,`ll``一看,嘿 还真缺了:
那就只能按照它的提示老老实实去下载安装了。
解决步骤
1. 前往官网下载
上方的报错提供了一个下载地址,不知道为什么我这边无法直接访问这个地址,网上查了一下在aka前边加上www.就可以访问了,可真神奇。【官网下载地址】https://dotnet.microsoft.com/en-us/download/dotnet/thank-you/sdk-6.0.201-linux-x64-binaries。直接下载x64的Binaries
2. 上传
下载完之后将压缩包的这两个文件夹解压出来,通过WinSCP软件将这俩文件夹里那个6.0.3上传到服务器的对应位置去
3. 重新键入指令运行项目
运行成功,问题解决~
更多推荐
所有评论(0)