执行./script/checkpatch.pl my.patch来检查补丁时报错"perl: warning: Setting locale failed. perl: warning: Please check that your locale settings: LANGUAGE = (unset), LC_ALL=(unset),"如何处理?

1. 情形

linux-kernel$ ./scripts/checkpatch.pl my.patch
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = (unset),
LC_ALL = (unset),
LANG = "en_US.UTF-8"
are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
Can't locate Term/ANSIColor.pm in @INC (you may need to install the Term::ANSIColor module)

2. 如何解决?

指定正确的perl路径,笔者的路径为:

/usr/bin/perl,因此

$ export PATH=/usr/bin:$PATH

原文地址:https://www.cnblogs.com/dakewei/p/12569032.html