This error looks like you have some different setup in /etc/profile
A non-zero return code was returned from sourcing /etc/profile. Please fix the error in /etc/profile and then run the install again.
Kindly source the profile and check if the exit code is 0
steps to source profile:
1. cd /etc
2. ls -l profile
3. source profile
4, echo 0
The expected output is " ZERO "
If it returns non-zero, then the behavior we are facing is expected. Hence kindly fix the profile in your environment and proceed with the installation.