Unable to execute Checkinstall.sh during 15.4.1 upgrade

Document ID : KB000101530
Last Modified Date : 14/06/2018
Show Technical Document Details
Issue:
When you run PPM 15.4.1 checkinstall script on Linux, an unexpected end of file error might occur.

The error may look something like the following:

Error: Invalid or corrupt jar file checkinstall.sh
or
-bash: ./checkinstall.sh: /bin/sh^M: bad interpreter: No such file or directory 
Resolution:
When you run checkinstall.sh on Linux, an unexpected end of file error might occur.

As a workaround, convert the script with dos2unix and then run it again. 
dos2unix ./checkinstall.sh 
dos2unix: converting file ./checkinstall.sh to Unix format ... 
sh ./checkinstall.sh 

(Optional) You can also use the following perl script to run checkinstall: 
perl -i -pe 'y|\r||d' checkinstall.sh 
Additional Information:
https://docops.ca.com/ca-ppm/15-4-1/en/installing-and-upgrading/install-ca-ppm#InstallCAPPM-ConfigureJavaEnvironmentVariablesontheApplicationServer