On windows 10, I created a .netCore (3.1.200) console application called helloWorld. Published it using the command:
dotnet publish -r linux-x64 --self-contained true
Copied over the publish folder to my linux machine (RHELS 6.10). Applied the executable permission chmod +x helloWorld
When I run the command, helloWorld
, I am getting this error:
helloWorld: /lib64/libc.so.6: version `GLIBC_2.14' not found (required by helloWorld)
How can I resolve that?
Here's the answer for anyone else having the same issue.
publish command : dotnet publish -r rhel.6-x64 --self-contained true
When you run it on RHEL you will get another error saying "ICU is missing".
To Resolve that : Add a new file in your project called runtimeconfig.template.json
Add this to the file:
{
"configProperties": {
"System.Globalization.Invariant": true
}
}
Now republish and re-run.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.