今天在安装memcache的php的扩展时遇到的错误: 1.将该扩展包解压 2.使用/usr/bin/phpize(rpm包安装后的位置)命令来准备 PHP 外挂模块的编译环境(如果找不到该命令则需要安装,这个命令有php-devel这个包生成,并且该包位于DVD2中) 上面1、2步成功 3.使用/usr/bin/phpize时报以下错误:

[root@node1 memcache-2.2.5]# /usr/bin/phpize
Configuring for:
PHP Api Version: 20090626
Zend Module Api No: 20090626
Zend Extension Api No: 220090626
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = (unset),
LC_ALL = (unset),
LANG = “en”
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 = “en”
are supported and installed on your system.
perl: warning: Falling back to the standard locale (“C”).

在使用其它的某些命令时(如:mysqlhotcopy)也会也出现类似的提示。 搜索了好一段时间,并试了几次,找到一个解决此问题的简单方法,如下:

[root@node1 memcache-2.2.5]#vim /root/.bashrc

#->再最底部加上
export LC_ALL=C

#->或者直接运行
[root@node1 memcache-2.2.5]# echo “export LC_ALL=C” >> /root/.bashrc

#->然后执行一下:
[root@node1 memcache-2.2.5]# source /root/.bashrc