Bug #2692

Pkg broken in new zones created under oi_151a4

Added by Logan Bruns almost 9 years ago. Updated almost 9 years ago.

PKG (Image Packaging System)
Target version:
Start date:
Due date:
% Done:


Estimated time:


If you create a new zone under oi_151a4 pkg does not work. Mostly likely due to a broken dependency as explained below.

The error you see when you run pkg in the new zone looks this:

# pkg install sudo
Traceback (most recent call last):
  File "/usr/bin/pkg", line 45, in <module>
    import pkg.client.api as api
  File "/usr/lib/python2.6/vendor-packages/pkg/client/", line 34, in <module>
    import pkg.client.image as image
  File "/usr/lib/python2.6/vendor-packages/pkg/client/", line 31, in <module>
    import pkg.client.imageconfig           as imageconfig
  File "/usr/lib/python2.6/vendor-packages/pkg/client/", line 16, in <module>
    import pkg.client.publisher as publisher
  File "/usr/lib/python2.6/vendor-packages/pkg/client/", line 24, in <module>
    import pycurl
ImportError: isapython2.6: fatal: open failed: No such file or directory

It looks the problem is because the pycurl-26 package does not depend upon web/curl as it probably should. The dependency chain in older versions of OI was:

pkg -> pycurl -> web/curl

Now with oi_151a4 it appears to be

pkg -> pycurl -> pycurl-26

Where pycurl-26 does not appear to currently depend on web/curl which owns the libcurl* library files.

The workaround is to copy libcurl* and libidn* from another box/zone to temporarily fix pkg then do pkg install web/curl to fix the issue.


Updated by Alasdair Lumsden almost 9 years ago

  • Project changed from illumos gate to illumos-userland

Updated by Alasdair Lumsden almost 9 years ago

Hi Logan,

Thanks for reporting this and spotting the missing dependency. We'll try and get this fixed soon.




Updated by Alasdair Lumsden almost 9 years ago

  • Project changed from illumos-userland to OpenIndiana Distribution
  • Status changed from New to In Progress
  • Assignee set to Jon Tibble
  • Priority changed from Normal to Urgent

Updated by Alasdair Lumsden almost 9 years ago

  • Category set to PKG (Image Packaging System)
  • Target version set to oi_151_stable
  • Tags deleted (needs-triage)

Updated by Jon Tibble almost 9 years ago

  • % Done changed from 0 to 90

Updated by Jon Tibble almost 9 years ago

  • Status changed from In Progress to Resolved
  • % Done changed from 90 to 100

Updated packages pushed to /dev at version


Updated by Jim Klimov almost 9 years ago

Just a note: my test system was not updated to oi_151a4 until recently, and I've hit this bug too with new local zones created in oi_151a3. Maybe my experience will help someone.
Due to the useless local zones' "pkg" implementation without python dependencies, I had to upgrade these local zones from the global one by such commands:

# zoneadm -z build-ss12sun halt
# zoneadm -z build-ss12sun detach  
# zoneadm -z build-ss12sun attach -u
Log File: /var/tmp/build-ss12sun.attach_log.77aWQt
               Attach Path: /zones/build/build-ss12sun/root
        Attach ZFS Dataset: rpool/zones/build/build-ss12sun/ROOT/zbe-1

                Installing: Using pre-existing data in zonepath
       Global zone version: entire@0.5.11,5.11-
   Non-Global zone version: entire@0.5.11,5.11-
                     Cache: Using /var/pkg/publisher.
  Updating non-global zone: Output follows
            Packages to update: 102    
       Create boot environment:  No
Create backup boot environment:  No

DOWNLOAD                                  PKGS       FILES    XFER (MB)
Completed                              102/102   1094/1094    45.4/45.4

PHASE                                        ACTIONS
Removal Phase                              1564/1564 
Install Phase                              1565/1565
Update Phase                               2323/2323 

PHASE                                          ITEMS
Package State Update Phase                   204/204 
Package Cache Update Phase                   102/102 
Image State Update Phase                         2/2 

  Updating non-global zone: Zone updated.
                    Result: Attach Succeeded.

# pkg -R /zones/build/build-ss12sun/root update -v       
           Packages to install:        4
            Packages to update:       20
     Estimated space available: 27.06 GB
Estimated space to be consumed: 83.29 MB
       Create boot environment:       No
Create backup boot environment:       No
            Services to change:        1
          Rebuild boot archive:       No

Changed packages:
    None -> 1.9,5.11-
    None -> 0.21.1,5.11-
    1.0.8,5.11- -> 1.0.8,5.11-
DOWNLOAD                                  PKGS       FILES    XFER (MB)
Completed                                24/24     655/655      3.9/3.9

PHASE                                        ACTIONS
Removal Phase                                525/525 
Install Phase                                943/943 
Update Phase                                 371/371 

PHASE                                          ITEMS
Package State Update Phase                     44/44 
Package Cache Update Phase                     20/20 
Image State Update Phase                         2/2 

The following unexpected or editable files and directories were
salvaged while executing the requested package operation; they
have been moved to the displayed location in the image:

  usr/share/man/cat1 -> /zones/build/build-ss12sun/root/var/pkg/lost+found/usr/share/man/cat1-20120608T221218Z

NOTE: Please review release notes posted at:

Also available in: Atom PDF