0

I'm trying to add a package in SUN Solaris 10, using the following command:

pkgadd -d SomePackage.pkg

This throws the following error:

/usr/sadm/install/bin/pkginstall: illegal option -- o
usage:
    pkginstall [-o] [-n] [-d device] [-m mountpt [-f fstype]] [-v]

Could anyone suggest a reason for this error?

Here is the output of "pkginfo -d CheckMK.pkg -l"

   PKGINST:  CheckMK
      NAME:  Check_MK Solaris Monitoring Agent
  CATEGORY:  application
      ARCH:  SPARC
   VERSION:  1.2.4p5
   BASEDIR:  /opt/
    VENDOR:  SomeVendor
    PSTAMP:  **********
    STATUS:  spooled
     FILES:       18 spooled pathnames
                   5 directories
                   3 executables
                   5 package information files
                1193 blocks used (approx)

pkginfo -l SUNWpkgcmdsu

   PKGINST:  SUNWpkgcmdsu
      NAME:  SVr4 packaging commands (usr)
  CATEGORY:  system
      ARCH:  i386
   VERSION:  11.11,REV=2005.01.09.21.19
   BASEDIR:  /
    VENDOR:  Oracle Corporation
      DESC:  Solaris 2.x System V Release IV Packaging Commands (usr)
    PSTAMP:  on10-adms-patch-x20110330171234
  INSTDATE:  Jul 16 2014 09:03
   HOTLINE:  Please contact your local service provider
    STATUS:  completely installed
     FILES:       40 installed pathnames
                   8 shared pathnames
                   2 linked files
                   8 directories
                  27 executables
                6267 blocks used (approx)
6
  • the output of pkginfo -d SomePackage.pkg -l might help, too
    – Jeff Schaller
    Jun 22, 2015 at 18:02
  • @rocky "which pkgadd" shows following out put: /usr/sbin/pkgadd
    – guru
    Jun 23, 2015 at 13:42
  • What package is this? Where did you get it?
    – jlliagre
    Jun 23, 2015 at 14:00
  • I have add those detail in question.
    – guru
    Jun 23, 2015 at 14:40
  • @jilliagre This package is named as "Check_MK" I edit the question with the output of pkginfo.
    – guru
    Jun 23, 2015 at 14:46

1 Answer 1

1

Your version of SUNWpkgcmdsu is old. So make sure you have the recent/latest patches applied for SUNWpkgcmdsu.

The CheckMK package is running /usr/sadm/bin/install/pkginstall -o ... which errors. Your system's /usr/sadm/bin/install/pkginstall doesn't support the option -o option.

pkginstall is part of Sun's SUNWpkgcmdsu package.

SUNWpkgcmdsu 11.11,REV=2005.01.09.23.05 version of pkginstall does support the -o option.

Two other things I can think of is to compare /usr/sadm/install/bin/pkginstall with a binary from another system where installing this package worked, if there was one.

The other thing which might help in going back to the CheckMQ people would be to temporarily move /usr/sadm/install/bin/pkginstall to /usr/sadm/install/bin/pkginstall-real:

cd /usr/sadm/install/bin
mv pkginstall pkginstall-real

and then create a script called /usr/sadm/install/bin/pkginstall to show how pkginstall was called:

#!/bin/sh
echo $*
exec /usr/sadm/install/bin/pkginstall-real $* 

$ chmod +x pkginstall

With this, when you try to install using pkgadd, you should see the invocation of pkginstall that was done.

But alas, I think the solution here will lie between Oracle/Solaris support or the people at Check_MQ.

3
  • I only execute pkgadd -d SomePackage.pkg. Couldn't find how "pkginstall -o" getting executed below the command. DO you have any idea how it happens?
    – guru
    Jun 24, 2015 at 14:54
  • 1
    The command you run, runs other commands. If you want more help, cut and paste the output of pkginfo -l SUNWpkgcmdsu
    – rocky
    Jun 24, 2015 at 15:04
  • I add the out put of the command with my question.
    – guru
    Jun 25, 2015 at 13:29

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .