![]() | Oracle System Handbook - ISO 7.0 May 2018 Internal/Partner Edition | ||
|
|
![]() |
||||||||||||||||||
Solution Type Problem Resolution Sure Solution 2080473.1 : pkg command doesn't work due to /var/pkg/pkg5.image file corruption
In this Document
Created from <SR 3-11730744671> Applies to:Solaris Operating System - Version 11 11/11 and laterSPARC SuperCluster T4-4 Full Rack Information in this document applies to any platform. Symptoms'pkg' command used with any argument generates the following error: # pkg publisher
Traceback (most recent call last): File "/usr/bin/pkg", line 6516, in handle_errors __ret = func(*args, **kwargs) File "/usr/bin/pkg", line 6474, in main_func api_inst = __api_alloc(mydir, provided_image_dir, pkg_image_used) File "/usr/bin/pkg", line 1470, in __api_alloc exact_match=exact_match) File "/usr/lib/python2.6/vendor-packages/pkg/client/api.py", line 353, in __init__ cmdpath=self.cmdpath) File "/usr/lib/python2.6/vendor-packages/pkg/client/image.py", line 231, in __init__ progtrack) File "/usr/lib/python2.6/vendor-packages/pkg/client/image.py", line 525, in find_root startd=startd, progtrack=progtrack) File "/usr/lib/python2.6/vendor-packages/pkg/client/image.py", line 837, in __set_dirs self.root) UnsupportedImageError: The image rooted at / is invalid or is not supported by this version of the packaging system. pkg: This is an internal error in pkg(5) version 73408dc40dc9. Please log a Service Request about this issue including the information above and this message.
CauseCorrupted pkg5.image on /var/pkg directory. Checking on that directory: # cd /var/pkg
# ls -latr (snip) -rw-r--r-- 1 root root 2289 Nov 9 23:26 pkg5.image.1447108083.58 -rw-r--r-- 1 root root 2289 Nov 10 23:26 pkg5.image.1447194471.45 -rw-r--r-- 1 root root 2289 Nov 11 23:26 pkg5.image.1447280852.96 -rw-r--r-- 1 root root 2289 Nov 12 23:26 pkg5.image.1447367290.86 -rw-r--r-- 1 root root 2289 Nov 13 23:26 pkg5.image.1447453684.9 drwxr-xr-x 4 root root 6 Nov 13 23:28 state drwxr-xr-x 2 root root 1152 Nov 13 23:28 history -rw-r--r-- 1 root root 0 Nov 13 23:28 lock drwxr-xr-x 5 root root 8 Nov 13 23:28 cache -rw-r--r-- 1 root root 399 Nov 18 14:21 pkg5.image <<< drwxr-xr-x 12 root root 359 Nov 18 14:21 . # ls -l pkg5.image -rw-r--r-- 1 root root 399 Nov 18 14:21 pkg5.image Solution
If there are no backup files in /var/pkg directory, you can get that file from an old boot environment from same node or from a good known backup.
NOTE: The pkg5.image file is a text file. You should take a look at that file and check the contents because the file needs to match the repository.
References<BUG:15747882> - SUNBT7100168 /VAR/PKG/PKG5.IMAGE FILE CORRUPTED AND SYSTEM-REPOSITORY LANDS INTOAttachments This solution has no attachment |
||||||||||||||||||
|