本地机器没有安装相应的语言包支持

博客指出程序出错崩溃的原因是接口库文件在接口调用时有返回GBK字段,但本地机器未安装相应语言包支持。并给出了解决方法,即安装中文语言包支持,还提到“locale::facet::_S_create_c_locale name not valid(LC_ALL=C没用的)”问题的解决办法。

错误:

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没用的)问题解决方法

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值