Автор Тема: Ошибка pkg  (Прочитано 234 раз)

Оффлайн keremet

  • Global Moderator
  • ROOT
  • *****
  • Сообщений: 456
  • Репутация: +237/-0
    • Просмотр профиля
    • OpenSolaris
Ошибка pkg
« : Декабрь 08, 2016, 05:28:34 pm »
$ sudo pkg install  pkg:/developer/gnu-binutils@2.25.1-2016.0.1.2
Linked image publisher check
Traceback (most recent call last):
  File "/usr/bin/pkg", line 5444, in handle_errors
    __ret = func(*args, **kwargs)
  File "/usr/bin/pkg", line 5430, in main_func
    pargs=pargs, **opts)
  File "/usr/bin/pkg", line 2100, in install
    display_plan_cb=display_plan_cb, logger=logger)
  File "/usr/lib/python2.7/vendor-packages/pkg/client/client_api.py", line 1554, in _install
    logger=logger)
  File "/usr/lib/python2.7/vendor-packages/pkg/client/client_api.py", line 1442, in __api_op
    logger=logger, **kwargs)
  File "/usr/lib/python2.7/vendor-packages/pkg/client/client_api.py", line 1313, in __api_plan
    display_plan_cb=display_plan_cb)
  File "/usr/lib/python2.7/vendor-packages/pkg/client/client_api.py", line 1285, in __api_plan
    for pd in api_plan_func(**kwargs):
  File "/usr/lib/python2.7/vendor-packages/pkg/client/api.py", line 1517, in __plan_op
    log_op_end_all=True)
  File "/usr/lib/python2.7/vendor-packages/pkg/client/api.py", line 1427, in __plan_op
    self.__linked_pubcheck(_op)
  File "/usr/lib/python2.7/vendor-packages/pkg/client/api.py", line 1610, in __linked_pubcheck
    self._img.linked.api_recurse_pubcheck(self.__progresstracker)
  File "/usr/lib/python2.7/vendor-packages/pkg/client/linkedimage/common.py", line 2367, in api_recurse_pubcheck
    _failfast=False))
  File "/usr/lib/python2.7/vendor-packages/pkg/client/linkedimage/common.py", line 2057, in __children_op
    stage=pkgdefs.API_STAGE_DEFAULT
  File "/usr/lib/python2.7/vendor-packages/pkg/client/linkedimage/common.py", line 2159, in __children_op_vec
    _syncmd_tmp, **kwargs)
  File "/usr/lib/python2.7/vendor-packages/pkg/client/linkedimage/common.py", line 3229, in child_op_setup
    self.__child_setup_pubcheck(_pmd, **kwargs)
  File "/usr/lib/python2.7/vendor-packages/pkg/client/linkedimage/common.py", line 3187, in __child_setup_pubcheck
    pkgdefs.PKG_OP_PUBCHECK)
  File "/usr/lib/python2.7/vendor-packages/pkg/client/pkgremote.py", line 408, in setup
    self.__rpc_server_setup(img_path)
  File "/usr/lib/python2.7/vendor-packages/pkg/client/pkgremote.py", line 163, in __rpc_server_setup
    rpc_client = pkg.pipeutils.PipedServerProxy(client_cmd_pipe)
  File "/usr/lib/python2.7/vendor-packages/pkg/pipeutils.py", line 628, in __init__
    http_enc=http_enc)
  File "/usr/lib/python2.7/vendor-packages/pkg/pipeutils.py", line 412, in __init__
    rpc.Transport.__init__(self)
TypeError: __init__() takes exactly 2 arguments (1 given)


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



Решение:
vi /usr/lib/python2.7/vendor-packages/pkg/pipeutils.py.

Добавить в секцию импорта:
import jsonrpclib.config as rpcconfig

Изменить строку 412 (теперь 413) на:
rpc.Transport.__init__(self,config=rpcconfig.DEFAULT)