Thursday, February 12, 2009

Solaris: pkgadd: ERROR: checkinstall error Solution

root@mike# pkgadd -d ./TIVsmCapi.pkg

The following packages are available:
1 TIVsmCapi IBM Tivoli Storage Manager Solaris 9/10 API Client
(sparc) Version 5 Release 5 Level 0.0

Select package(s) you wish to process (or 'all' to process
all packages). (default: all) [?,??,q]: all

Processing package instance from

IBM Tivoli Storage Manager Solaris 9/10 API Client
(sparc) Version 5 Release 5 Level 0.0
Licensed Materials - Property of IBM

5655-A30
(C) Copyright International Business Machines Corp. 1990, 2007.

All rights reserved.
US Government Users Restricted Rights - Use, duplication or disclosure
restricted by GSA ADP Schedule Contract with IBM Corp.

## Executing checkinstall script.
/var/tmp/dstreAAAuhaOTF/TIVsmCapi/install/checkinstall: /var/tmp/dstreAAAuhaOTF/TIVsmCapi/install/checkinstall: cannot open
pkgadd: ERROR: checkinstall script did not complete successfully

I found the solution from the net below with Solaris FAQ:


The solaris FAQ says:

5.53) Patch installation often fails with "checkinstall" errors.

When installing a patch, the Solaris 2.5+ patch installation procedure will execute the script "checkinstall" with uid nobody.

If any of the patch files cannot be read by nobody or if any part of the path leading up to the patch directory an error similar to the following will appear:

./installpatch . Generating list of files to be patched... Verifying sufficient filesystem capacity (exhaustive method) ... Installing patch packages... pkgadd: ERROR: checkinstall script did not complete successfully ....

You can workaround this in two ways, one is to make sure that nobody can read all patch files and execute a "pwd" in the patch directory or add an account "install" to /etc/passwd:


install:x:0:1:installpatch braindamage:/:/bin/true


Installpatch uses "nobody" as a fallback if it cannot find the "install" user.