操作系统:CentOS release 5.8 (Final)
Linux localhost.localdomain 2.6.18-308.el5 #1 SMP Tue Feb 21 20:06:06 EST 2012 x86_64 x86_64 x86_64 GNU/Linux
memcached安装命令如下:
yum install memcached
事先已经安装依赖包了。因此上述命令顺利安装。
然后,我要打开memcached:
service memcached start
这时就出现了如下错误:
Starting memcached: chown: `memcached': invalid user
can't find the user memcached to switch to
[FAILED]
我没有对其他文件进行任何修改或配置。
请教一下,这是什么原因?如何解决?谢谢!
怪我咯2017-04-17 11:35:27
An installation error occurred and a user named memcached was not successfully created. Man useradd yourself and then create it. Maybe a group with the same name is also needed.
高洛峰2017-04-17 11:35:27
Evian’s answer is right.
As for why the user was not created successfully, it is because the user creation function of the system is locked.
[root@203 etc]# lsattr /etc/passwd
------------- /etc/passwd
[root@203 etc]# lsattr /etc/shadow
----i-------- /etc/shadow
[root@203 etc]# lsattr /etc/gshadow
------------- /etc/gshadow
[root@203 etc]# lsattr /etc/group
------------- /etc/group
After I unlocked it and recreated the user, it was successful.
Thank you Evian!