Solaris patch return codes - patchadd

During our quarterly patching exercise using the Sun recommended patch clusters, we noticed that a number of patches are failing to installing on a number of Solaris 9 and 10 systems. Whilst some can be ignored we had to review others to confirm their importance.

When installing patches on Solaris, you may often see the return codes when the patch installation fails. These return codes indicate the cause of the failure to install the specified patch and are very helpful as point to start with in troubleshooting. For example:

Installing 113222-05...
Installing 117171-17...
  Installation of 117171-17 failed. Return code 2.
Installing 117175-02...
   Installation of 117175-02 failed. Return code 8.
Installing 115253-02...
Installing 113318-20...
   Installation of 113318-20 failed. Return code 2.

In reviewing our maintenance logs captured during patching, the most common return codes are 2 and 8, and on occasions 25 and 35:

  • 2 -- indicates that the patch you are trying to install is already been applied.
  • 8 -- indicate that the patch you are trying to install is for a package that is not already installed.
  • 25 -- indicates that a patch required for this patch to be installed in not found.
  • 35 -- indicates that the revision of the patch is older and that a later version of the patch is already applied to the system.

The following table lists the patch return codes and description for Solaris 8 and Solaris 9 (updated for Solaris 10).

return
samp
DescriptionSolaris
8910
0 No error * * *
1 Usage error * * *
2 Attempt to apply a patch that's already been applied * * *
3 Effective UID is not root * * *
4 Attempt to save original files failed * * *
5 pkgadd failed * * *
6 Patch is obsolete * * *
7 Invalid package directory * * *
8 Attempting to patch a package that is not installed * * *
9 Cannot access /usr/sbin/pkgadd (client problem) * * *
10 Package validation errors * * *
11 Error adding patch to root template * * *
12 Patch script terminated due to signal * * *
13 Symbolic link included in patch * * *
14 NOT USED * * *
15 The prepatch script had a return code other than 0 * * *
16 The postpatch script had a return code other than 0 * * *
17 Mismatch of the -d option between a previous patch install and the current one * * *
18 Not enough space in the file systems that are targets of the patch * * *
19 $SOFTINFO/INST_RELEASE file not found * * *
20 A direct instance patch was required but not found * * *
21 The required patches have not been installed on the manager * * *
22 A progressive instance patch was required but not found * * *
23 A restricted patch is already applied to the package * * *
24 An incompatible patch is applied * * *
25 A required patch is not applied * * *
26 The user specified back out data can't be found * * *
27 The relative directory supplied can't be found * * *
28 A pkginfo file is corrupt or missing * * *
29 Bad patch ID format * * *
30 Dryrun failure(s) * * *
31 Path given for -C option is invalid * * *
32 Must be running Solaris 2.6 or greater * * *
33 Bad formatted patch file or patch file not found * * *
34 The appropriate kernel jumbo patch needs to be installed * *
35 Later revision already installed * *
36 Cannot create safe temporary directory * *
37 Illegal backout directory specified * *
38 A prepatch, prePatch or a postpatch script could not be executed * *
39 A compressed patch was unable to be decompressed * *
40 Error downloading a patch * *
41 Error verifying signed patch * *
42 Error unable to retrieve patch information from SQL DB *
43 Error unable to update the SQL DB *
44 Lock file not available *
45 Unable to copy patch data to partial spool directory. *

Note These return codes have never officially been documented in SunSolve and may change without notification.