MongoDB mongorestore failure: locale::facet::_S_create_c_locale name not valid

后端 未结 6 1139
清歌不尽
清歌不尽 2020-12-07 08:11

I created a dump with mongodump on computer A (ubuntu 12.04 server). I moved it to computer B (ubuntu 12.04 server) and typed:

mongorestore -db db_nam

6条回答
  •  余生分开走
    2020-12-07 08:46

    Actually it isn't strictly related to MongoDB. Somehow the language on computer B was not defined correctly. I managed to fix it by typing:

    sudo locale-gen en_US en_US.UTF-8
    sudo locale-gen it_IT it_IT.UTF-8
    sudo locale-gen xx_xx xx_XX.UTF-8 ...
    sudo dpkg-reconfigure locales

    These commands will generate and configure the needed locales. After those steps mongorestore got back working as usual.

提交回复
热议问题