[英]Dart throwing errors on linux: GLIBC_2.14 GLIBC_2.15 not found
[英].netcore `GLIBC_2.14' not found error on linux (RHEL)
在 Windows 10 上,我創建了一個名為 helloWorld 的 .netCore (3.1.200) 控制台應用程序。 使用以下命令發布它:
dotnet publish -r linux-x64 --self-contained true
將發布文件夾復制到我的 linux 機器(RHELS 6.10)。 應用了可執行權限chmod +x helloWorld
當我運行命令helloWorld
時,出現此錯誤:
helloWorld: /lib64/libc.so.6: version `GLIBC_2.14' not found (required by helloWorld)
我該如何解決?
這是其他有同樣問題的人的答案。
發布命令: dotnet publish -r rhel.6-x64 --self-contained true
當您在 RHEL 上運行它時,您會收到另一個錯誤消息,提示“ICU 丟失”。
解決方法:在項目中添加一個名為runtimeconfig.template.json的新文件
將此添加到文件中:
{
"configProperties": {
"System.Globalization.Invariant": true
}
}
現在重新發布並重新運行。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.