"mock", Fedora 24, perl, and locales

October 05, 2016

If your Mock builds are complaining about perl locales, like


perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
	LANGUAGE = "en_US:en",
	LC_ALL = (unset),
	LANG = "en_US.UTF-8"
    are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").

you can fix or work around this in a number of ways:

  • Manually pre-install glibc-langpack-en:
    
    mock --no-cleanup-after -r mytarget --install glibc-langpack-en
    mock ...do my normal build here ...
    
  • Tell Perl to stop whining. In /etc/mock/site-defaults.cfg add a new line:
    
    config_opts['environment']['BADLANG'] = '0'
    

The correct fix would be to get mock to automatically install the correct langpack for the current locale when init’ing a root.

Share this

More Blogs