In relation to this post https://www.postgresql.org/message-id/flat/20171208104120.21687.74167%40wrigleys.postgresql.org, this is pretty old stuff but for some people encountering this issue, try deleting /etc/sysconfig/pgsql/postgresql-9.6. The issue as what I see relies on the /etc/init.d/postgresql-9.6 script. Also only occurs when you are actually retrying to re-install the package after it has been removed or so.