报错:
Process: 1142 ExecStart=/usr/sbin/firewalld --nofork --nopid $FIREWALLD_ARGS (code=exited, status=203/EXEC)
Main PID: 1142 (code=exited, status=203/EXEC)
[root@localhost ~]# systemctl status firewalld
?.firewalld.service - firewalld - dynamic firewall daemon
Loaded: loaded (/usr/lib/systemd/system/firewalld.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Mon 2020-10-12 04:57:16 EDT; 4min 43s ago
Docs: man:firewalld(1)
Process: 1142 ExecStart=/usr/sbin/firewalld --nofork --nopid $FIREWALLD_ARGS (code=exited, status=203/EXEC)
Main PID: 1142 (code=exited, status=203/EXEC)
Oct 12 04:57:16 localhost.localdomain systemd[1]: Starting firewalld - dynamic firewall daemon...
Oct 12 04:57:16 localhost.localdomain systemd[1142]: Failed at step EXEC spawning /usr/sbin/firewalld: No such file or directory
Oct 12 04:57:16 localhost.localdomain systemd[1]: firewalld.service: main process exited, code=exited, status=203/EXEC
Oct 12 04:57:16 localhost.localdomain systemd[1]: Failed to start firewalld - dynamic firewall daemon.
Oct 12 04:57:16 localhost.localdomain systemd[1]: Unit firewalld.service entered failed state.
Oct 12 04:57:16 localhost.localdomain systemd[1]: firewalld.service failed.
原因是系统python默认指向的是python2,而实际依赖的是python2.7
修改配置的位置
[root@localhost ~]# which firewalld
/usr/sbin/firewalld
接着启动firewalld