there must be a typo in the commands you executed, I just ran these commands and could install LAMP 5.6 in an already running machine
sudo mv /opt/bitnami /opt/bitnami.bak
curl -LJO "https://downloads.bitnami.com/files/stacks/lampstack/5.6.31-0/bitnami-lampstack-5.6.31-0-linux-x64-installer.run"
chmod +x ./bitnami-lampstack-5.6.31-0-linux-x64-installer.run
sudo ./bitnami-lampstack-5.6.31-0-linux-x64-installer.run --prefix /opt/bitnami
Can you try them again? Please note that you don't need to run the first 2 commands because you already moved the PHP 7.1 installation.
Happy to help!
Was my answer helpful? Click on