3 Replies Latest reply on Sep 3, 2008 1:50 PM by Sudhir Chamarthi

    pkgadd error ...

      My Solaris software install command in the Depot object looks thus:




      The package installs all the file successfully and you can do a pkginfo to see that the package is installed, although it marks it as 'partially' installed, and the Job itself reports a failure and in the error log you see this: ( coming from 'pkgadd' itself)


      Warning Aug 28, 2008 3:54:23 PM server_middle_man: pkgadd: ERROR: freopen(/dev/tty, "r", stdin) failed, errno=6 pkgadd: ERROR: postinstall script did not complete successfully


      It seems to be attempting to open a 'tty' session after installing all the files. 'Google' suggests to redirect the output, which I've done by appending ">/dev/null 2>&1" to the end of the install command. The above message disappears, but it still errors out. The message in the transaction log:


      08/28/08 16:04:49.340 ERROR bldeploy - [] Command returned non-zero exit code: 1

      08/28/08 16:04:49.340 DEBUG bldeploy - [] chdir to PkgDir: '/'

      08/28/08 16:04:49.341 ERROR bldeploy - [] Apply failed: id = 1

      08/28/08 16:04:49.341 DEBUG bldeploy - [] Apply failed -processing sub-list: id = 0


      We are able to run the same install command on the system directly without any issues and the pkg installs successfully.

        • 1. Re: pkgadd error ...
          Wenchi Liao

          Can you see what the postinstall is trying to do?


          Can you duplicate this error message by running the pkgadd command via cron?


          In addition to the "pkgadd >/dev/null 2>&1", try "pkgadd >&- <&-".

          • 2. Re: pkgadd error ...

            Wenchi, it is executing a perl script.




            eval 'exec /usr/bin/perl -S $0 ${1+"$@"}'

            if 0;



            1. Copyright (C) 2004 NCR Corporation


            1. Filename: postinstall


            1. Purpose: This is run after the Media Viewer package is installed--


            1. Remarks: It expects to find TOP_IAD_DIR in the environment already.





            I will mail you the script separately to see if you see anything being the cause.


            I will test the cron and the other options you mentioned and let you know.

            • 3. Re: pkgadd error ...

              Wenchi, closing stdout and stdin with >&- and <&- like you suggested, worked!