Checkinstall script fails when running standalone on Linux with "command not found"

Document ID : KB000105764
Last Modified Date : 09/07/2018
Show Technical Document Details
Issue:
On Linux: when preparing for an upgrade, extract the install.jar from DVD. Then navigate to checkinstall folder and run ./checkinstall.sh
 
Output will be similar to the following:
 
> sh ./checkinstall.sh
./checkinstall.sh: line 2: $'\r': command not found
./checkinstall.sh: line 4: $'\r': command not found
./checkinstall.sh: line 6: $'\r': command not found
./checkinstall.sh: line 8: $'\r': command not found
./checkinstall.sh: line 9: $'\r': command not found
./checkinstall.sh: line 20: syntax error: unexpected end of file
 
Cause:
Caused by:
DE32237
Fixed in 15.3
 
Resolution:
Workaround 1:
You could run the install script that calls the checkinstall:
 
Please do the following:
1. Navigate to $install
2. Run the command install
3. Follow the prompts
4. The first part of the upgrade will be checkinstall. After it runs successfully it will ask you whether you would like to continue with the upgrade after reviewing the files:
 
It will look like this:
 
7/02/18 6:23 PM (Target) Target "checkinstall" finished.
7/02/18 6:23 PM (Echo)
7/02/18 6:23 PM (Echo)
7/02/18 6:23 PM (Echo) -------------------------------------------------------------
7/02/18 6:23 PM (Echo) The Precheck for install/upgrade results contain warning messages.
7/02/18 6:23 PM (Echo) Please see the checkinstall/check-logs/precheck-results.html and
7/02/18 6:23 PM (Echo) checkinstall.log files for information.
7/02/18 6:23 PM (Echo) -------------------------------------------------------------
7/02/18 6:23 PM (Echo)
7/02/18 6:23 PM (Echo)
7/02/18 6:23 PM (ReadLine)
7/02/18 6:23 PM (ReadLine) Type 'y' to proceed :
7/02/18 6:25 PM (Target) Target "_precheck" finished.
7/02/18 6:25 PM (Target) Target "upgrade" started.
 
You will have the option to say 'n' if you only want to run checkinstall.
 
 Workaround 2:
Alternatively you can use the workaround to convert the file (the issue is that it contains DOS End of File character)
 
# dos2unix ./checkinstall.sh
dos2unix: converting file ./checkinstall.sh to Unix format ...
# sh ./checkinstall.sh