错误:
terminate called after throwing an instance of 'std::runtime_error'
what(): locale::facet::_S_create_c_locale name not valid
./mqtt.sh: line 24: 2625 Aborted ./main -c ./conf/mqtt.cfg
原因:接口库文件在接口调用时有返回GBK字段,但是由于本地机器没有安装相应的语言包支持。所以程序出错崩溃。
解决方法:安装中文语言包支持
root@orangepizero3:/work/02-magicbox/server/app/19-magicbox/dist# sudo dpkg-reconfigure locales
Generating locales (this might take a while)...
en_US.UTF-8... done
zh_CN.GB2312... done
zh_CN.GB18030... done
zh_CN.GBK... done
zh_CN.UTF-8... done
Generation complete.
root@orangepizero3:/work/02-magicbox/server/app/19-magicbox/dist#
locale::facet::_S_create_c_locale name not valid(LC_ALL=C没用的)问题解决方法
博客指出程序出错崩溃的原因是接口库文件在接口调用时有返回GBK字段,但本地机器未安装相应语言包支持。并给出了解决方法,即安装中文语言包支持,还提到“locale::facet::_S_create_c_locale name not valid(LC_ALL=C没用的)”问题的解决办法。

1395

被折叠的 条评论
为什么被折叠?



