My Oracle Support Banner

Receive Error as "KeyError: 'version-source" When trying to pkg install or pkg update (Doc ID 2758256.1)

Last updated on MARCH 05, 2021

Applies to:

Solaris Operating System - Version 11.3 and later
Information in this document applies to any platform.

Symptoms

Pay attention to the error as

KeyError: 'version-source'

at the end

This can be happen while doing


[root]# pkg uninstall sudo
Creating Plan (Evaluating mediators): |
Traceback (most recent call last):
  File "/usr/bin/pkg", line 6702, in handle_errors
  __ret = func(*args, **kwargs)
  File "/usr/bin/pkg", line 6688, in main_func
  pargs=pargs, **opts)
  File "/usr/bin/pkg", line 2074, in uninstall
  new_be=new_be, pkgs_to_uninstall=pargs, update_index=update_index)
  File "/usr/bin/pkg", line 1759, in __api_op
  _verbose=_verbose, **kwargs)
  File "/usr/bin/pkg", line 1645, in __api_plan
  rv = __api_plan_exception(_op, _noexecute, _verbose, _api_inst)
  File "/usr/bin/pkg", line 1620, in __api_plan
  for pd in api_plan_func(**kwargs):
  File "/usr/lib/python2.7/vendor-packages/pkg/client/api.py", line 1509, in __plan_op
  self.__plan_common_exception()
  File "/usr/lib/python2.7/vendor-packages/pkg/client/api.py", line 1452, in __plan_op
  self._img.make_uninstall_plan(**kwargs)
  File "/usr/lib/python2.7/vendor-packages/pkg/client/image.py", line 4489, in make_uninstall_plan
  pkgs_to_uninstall=pkgs_to_uninstall)
  File "/usr/lib/python2.7/vendor-packages/pkg/client/image.py", line 4353, in __make_plan_common
  self.__call_imageplan_evaluate(ip)
  File "/usr/lib/python2.7/vendor-packages/pkg/client/image.py", line 4266, in __call_imageplan_evaluate
  ip.evaluate()
  File "/usr/lib/python2.7/vendor-packages/pkg/client/imageplan.py", line 3302, in evaluate
  self.__merge_actions()
  File "/usr/lib/python2.7/vendor-packages/pkg/client/imageplan.py", line 4274, in __merge_actions
  self.__finalize_mediation(prop_mediators)
  File "/usr/lib/python2.7/vendor-packages/pkg/client/imageplan.py", line 3789, in __finalize_mediation
  del new_mediation["version-source"]
KeyError: 'version-source'


pkg: This is an internal error in pkg(5) version 90d7bc64cdeb. Please log a
Service Request about this issue including the information above and this
message.
[root@twspprtrldt02 ~]#

 

OR

 

[root]# pkg update -vn --no-be-activate --accept --be-name 11u3.31.6.0 entire@0.5.11-0.175.3.31.0.6.0
Creating Plan (Evaluating mediators): /
Traceback (most recent call last):
File "/usr/bin/pkg", line 6702, in handle_errors
__ret = func(*args, **kwargs)
File "/usr/bin/pkg", line 6688, in main_func
pargs=pargs, **opts)
File "/usr/bin/pkg", line 2115, in update
update_index=update_index)
File "/usr/bin/pkg", line 1759, in __api_op
_verbose=_verbose, **kwargs)
File "/usr/bin/pkg", line 1645, in __api_plan
rv = __api_plan_exception(_op, _noexecute, _verbose, _api_inst)
File "/usr/bin/pkg", line 1620, in __api_plan
for pd in api_plan_func(**kwargs):
File "/usr/lib/python2.7/vendor-packages/pkg/client/api.py", line 1507, in __plan_op
log_op_end_all=True)
File "/usr/lib/python2.7/vendor-packages/pkg/client/api.py", line 1454, in __plan_op
self._img.make_update_plan(**kwargs)
File "/usr/lib/python2.7/vendor-packages/pkg/client/image.py", line 4445, in make_update_plan
pkgs_update=pkgs_update, reject_list=reject_list)
File "/usr/lib/python2.7/vendor-packages/pkg/client/image.py", line 4294, in __make_plan_common
self.__call_imageplan_evaluate(ip)
File "/usr/lib/python2.7/vendor-packages/pkg/client/image.py", line 4207, in __call_imageplan_evaluate
ip.evaluate()
File "/usr/lib/python2.7/vendor-packages/pkg/client/imageplan.py", line 3247, in evaluate
self.__merge_actions()
File "/usr/lib/python2.7/vendor-packages/pkg/client/imageplan.py", line 4219, in __merge_actions
self.__finalize_mediation(prop_mediators)
File "/usr/lib/python2.7/vendor-packages/pkg/client/imageplan.py", line 3734, in __finalize_mediation
del new_mediation["version-source"]
KeyError: 'version-source'

pkg: This is an internal error in pkg(5) version 06232226489c. Please log a
Service Request about this issue including the information above and this
message.

Cause

To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!


In this Document
Symptoms
Cause
Solution
References


My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.