You can try googling the errors with the commands and fix the possible errors. If you're facing errors with
apt
and
dpkg
then you can remove the post installation script and safely replace it after you've fixed the commads. However, this may not always be the correct solution. You may want to
ask a new question.