Solaris Zones – SUNWhea package in a non-Global zone

Stupid, but for some reason Solaris 10 (Update 9) doesnt’ allow installation of the SUNWhea package into a non-global zone:

bash-3.00# zonename
bash-3.00# pkgadd -d /SUNWhea.pkg SUNWhea
pkgadd: ERROR: The package <SUNWhea> may only be installed by the global zone administrator
pkgadd: ERROR: unable to install package <SUNWhea>

1 package was not processed!


But you can hack around this:


bash-3.00# pkgtrans /SUNWhea.pkg /tmp all
Transferring <SUNWhea> package instance

bash-3.00# sed -e ‘s/SUNW_PKG_ALLZONES=true/SUNW_PKG_ALLZONES=false/’ /tmp/SUNWhea/pkginfo > /tmp/x ; cat /tmp/x > /tmp/SUNWhea/pkginfo

bash-3.00# pkgchk -v -d /tmp SUNWhea
Checking uninstalled directory format package <SUNWhea> from </tmp>
## Checking control scripts.
## Checking package objects.
NOTE: some pathnames are in private formats and cannot be verified
ERROR: /tmp/SUNWhea/pkginfo
modtime <08/12/10 02:53:04 AM> expected <03/02/11 03:59:53 PM> actual
file size <14297> expected <14298> actual
file cksum <14139> expected <14214> actual
## Checking is complete.

1 i pkginfo 14297 14139 1281545584

bash-3.00# sed -e ‘s/1 i pkginfo.*/1 i pkginfo 14298 14214 1/’ /tmp/SUNWhea/pkgmap> /tmp/x ; cat /tmp/x > /tmp/SUNWhea/pkgmap

bash-3.00# pkgadd -d /tmp SUNWhea

Processing package instance <SUNWhea> from </tmp>

SunOS Header Files(i386) 11.10.0,REV=2005.
Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
Using </> as the package base directory.
## Processing package information.
## Processing system information.
10 package pathnames are already properly installed.
## Verifying package dependencies.
## Verifying disk space requirements.
## Checking for conflicts with packages already installed.
## Checking for setuid/setgid programs.

This package contains scripts which will be executed with super-user
permission during the process of installing this package.

Do you want to continue with the installation of <SUNWhea> [y,n,?] y

Installing SunOS Header Files as <SUNWhea>

## Installing part 1 of 1.
19162 blocks

Installation of <SUNWhea> was successful.
bash-3.00# pkgchk SUNWhea
bash-3.00# pkginfo SUNWhea
system      SUNWhea SunOS Header Files


2 Responses to Solaris Zones – SUNWhea package in a non-Global zone

  1. Enrique says:

    Hello. I’ve found your post, looking for the SUNWhea pkg to install, actually I’m trying to install Qt, but as i don’t have the Whea pkg, nothing compiles, it’s a system from work, and I couldn’t find the package in the DVD, anyway, my question is from where did you get the Whea Package, here the outpout of my uname -a

    bash-3.00# uname -a
    SunOS 5.10 Generic_142900-13 sun4v sparc SUNW,SPARC-Enterprise-T5220

    I just hope you can help me.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: