Rate This Document
Findability
Accuracy
Completeness
Readability

Locale Configuration Error

Symptom

The onnxruntime_test_all test program displays the following information indicating that the test cases fail:

Key Process and Cause Analysis

The locale of the system is not generated or is not set to en_US.UTF-8.

Conclusion and Solution

  1. Set the locale environment variables.
    export LANG=en_US.UTF-8
    export LC_ALL=en_US.UTF-8
  2. Obtain the list of available locales of the system.
    locale -a
    • If the command output contains en_US.UTF-8, the locale configuration error is resolved. Skip the following steps.
    • If the following information is displayed, en_US.UTF-8 is not generated. Go to the next step.

  3. Install or supplement all packages related to glibc to obtain the locale-gen tool.
    yum install glibc*
  4. Generate and install the required locale, that is, en_US.UTF-8.
    localedef -i en_US -f UTF-8 en_US.UTF-8
  5. Obtain the list of available locales of the system again. If the command output contains en_US.UTF-8, the locale configuration error is resolved.
    localedef -a
  6. Recompile and verify. For details, see Compiling the Source Code and Running and Verification.