## 概述
Linux系统下,C++编译的库程序运行时,突然报错:
```
terminate called after throwing an instance of ‘std::runtime_error‘
what(): locale::facet::_S_create_c_locale name not valid
```
## 原因
该错误是因为程序中使用了GBK字段(或其他系统不支持的字符集数据)导致的。

## 解决方法
使用locale -a命令查看当前系统支持的字符集,选择一个系统支持的字符集即可。
locale::facet::_S_create_c_locale name not valid
原文:https://blog.51cto.com/weiyuqingcheng/2884414