11
2020
09

解决PHP 安装扩展时发生 warning: Setting locale failed. 报错

现象:

[root@test-1-61 redis-5.3.0]# /home/pirate/programs/php7/bin/phpize
Configuring for:
PHP Api Version:         20151012
Zend Module Api No:      20151012
Zend Extension Api No:   320151012
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
	LANGUAGE = (unset),
	LC_ALL = (unset),
	LANG = "zh_CN.UTF-8"
    are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
	LANGUAGE = (unset),
	LC_ALL = (unset),
	LANG = "zh_CN.UTF-8"
    are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").

解决方法:

echo "export LC_ALL=C" >> /root/.bashrc

source /root/.bashrc


« 上一篇 下一篇 »

公告:

跟着我一起每天进步一点点,让学习成为一种习惯!

公告:

跟着我一起每天进步一点点,让学习成为一种习惯!