.netcore 跑在linux系统中如果是从苹果电脑直接SSH上去,会报一个错误:
Infinite recursion during resource lookup within System.Private.CoreLib. This may be a bug in System.Private.CoreLib, or potentially in certain extensibility points such as assembly resolve events or CultureInfo names. Resource name: Argument_CultureNotSupporte
甚至直接运行dotnet --help都会报这个错误。而如果是从其他SSH工具登录进去则没有这个错误。
如果你从两个终端去运行locale命令,会看到不同的效果,一个是zh-cn.UTF8一个是en-us.UTF8。
解决办法参考
https://blog.csdn.net/zzzjjjfff/article/details/79504949
# tee /etc/environment <<- 'EOF'
LANG=en_US.utf-8
LC_ALL=
EOF
# source /etc/environment
/* 生成 en_US.UTF-8 locale文件 CentOS没有locale-gen命令*/
# localedef -v -c -i en_US -f UTF-8 en_US.UTF-8
完了再重新登录进去也就OK了