I'm trying install Gammu 1.42 to serve my SMS gateway on Centos 8.
make, make test, make install works fine.
LD_LIBRARY_PATH configured in /etc/profile as:
......
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib:.:/usr/local/lib64
export PATH USER LOGNAME MAIL HOSTNAME HISTSIZE HISTCONTROL LD_LIBRARY_PATH
......
I print env by printenv, LD_LIBRARY_PATH found. /etc/gammu-smsdrc configured as:
......
[gammu]
device = /dev/ttyUSB0
model = E3131
connection = at115200
[smsd]
service = sql
driver = native_pgsql
logFIle = /var/log/gammu/smsd.log
logFormat = errorsdate
Host = xx.0.1.xx:xxxx
user = xxxx
password = xxxxx
database = xxxxx
debuglevel = 2
StatusFrequency = 60
LoopSleep = 60
DeliveryReport = sms
PhoneID = ozssc-smsd
SMSC = +614xxxxxxxx
BackendRetries = 60
I tried start gammu command line in terminal, it works fine. But when I tried to start system service by using systemctl, it failed.
error query result as:
[root@Centos8Gateway etc]# systemctl status gammu-smsd.service
● gammu-smsd.service - SMS daemon for Gammu
Loaded: loaded (/usr/lib/systemd/system/gammu-smsd.service; disabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Sun 2020-10-25 12:13:42 AEDT; 19s ago
Docs: man:gammu-smsd(1)
Process: 23247 ExecStopPost=/bin/rm -f /var/run/gammu-smsd.pid (code=exited, status=0/SUCCESS)
Process: 23245 ExecStart=/usr/local/bin/gammu-smsd --pid=/var/run/gammu-smsd.pid --daemon (code=exited, status=127)
Oct 25 12:13:42 Centos8Gateway systemd[1]: Starting SMS daemon for Gammu...
Oct 25 12:13:42 Centos8Gateway gammu-smsd[23245]: /usr/local/bin/gammu-smsd: error while loading shared libraries: libgsmsd.so.8: cannot open shared object file: No such file or directory
Oct 25 12:13:42 Centos8Gateway systemd[1]: gammu-smsd.service: Control process exited, code=exited status=127
Oct 25 12:13:42 Centos8Gateway systemd[1]: gammu-smsd.service: Failed with result 'exit-code'.
Oct 25 12:13:42 Centos8Gateway systemd[1]: Failed to start SMS daemon for Gammu.
[root@Centos8Gateway etc]#
I'm trying to find out why Centos 8 system service loader not use configured system environment variable? and not provide command line LD lib path parameters as well.
What I missed? Please advise!