Yum installation fails with exit status 1 on CentOS7

Hi All,

I’m trying to fresh-install influxdb 2.1.1 on CentOS7 and it fails with the following errors.
Does anybody know the solution??

/var/tmp/rpm-tmp.UPDieu: line 9: useradd: command not found
chown: invalid user: ‘influxdb:influxdb’
chown: invalid user: ‘influxdb:influxdb’
error: %pre(influxdb2-0:2.1.1-1.x86_64) scriptlet failed, exit status 1
Error in PREIN scriptlet in rpm package influxdb2-2.1.1-1.x86_64
error: influxdb2-0:2.1.1-1.x86_64: install failed

Many thanks in advance,
KIA

In addition, one interesting thing I found is that “–installroot” seems to be contributing the issue.
Without that option, the installtion works.
How can I install influxdb2 in non-default location?

PS.
I double checked that 1.8.10 can be installed in non-default location without any issues.

Thx,
KIA

Here is the error:

line 9: useradd: command not found

That install root option seems to prevent the useradd command from running, which causes the install to fail.

@jpowers,

Thanks for an update.
One interesting thing is it only occures on CentOS7.
Everything is fine on CentOS8 and older version(1.x) works on both 7 and 8.
Strange…

KIA