«bin/magento setup:di:compile» leads the PHP 7.1 interpreter to a «segment error»

Hi @Paul_King,
You should not «install it again», you should upgrade.
I have tried it myself, but now your server is misconfigured, and the composer update command does not work at all:

«The “https://repo.magento.com/packages.json” file could not be downloaded: allow_url_fopen must be enabled in php.ini».

Please fix this issue first.