make: ldconfig:command not found

I tried to build my first rpm in OBS. But error occured. Here is the related output:

make[2]: Leaving directory `/usr/src/packages/BUILD/openfetion-1.7/resource'
make[1]: Leaving directory `/usr/src/packages/BUILD/openfetion-1.7/resource'
make[1]: Entering directory `/usr/src/packages/BUILD/openfetion-1.7'
make[2]: Entering directory `/usr/src/packages/BUILD/openfetion-1.7'
make[2]: Nothing to be done for `install-exec-am'.
make[2]: Nothing to be done for `install-data-am'.
make[2]: Leaving directory `/usr/src/packages/BUILD/openfetion-1.7'
make[1]: Leaving directory `/usr/src/packages/BUILD/openfetion-1.7'
make: ldconfig: Command not found
make: *** [install] Error 127
error: Bad exit status from /var/tmp/rpm-tmp.vx6yhR (%install)


RPM build errors:
    Bad exit status from /var/tmp/rpm-tmp.vx6yhR (%install)
SysRq : Power Off
Power down.

Here is my spec file.
https://build.opensuse.org/package/view_file?file=openfetion.spec&package=openfetion&project=home%3Aphilacorns%3Agreen-tea

I have no problem building the packages on my own laptop.

Patch the Makefile to remove the ldconfig execution. That’s something to do in post/postun scriplets, not in the build.

Thanks. But I wonder why it works on my native system.

It works on your native system because you execute make install as root. ldconfig is in /sbin, not in the $PATH of normal users.