错误配置od Hyperledger Indy节点导致错误,并显示消息“未定义符号:indy_crypto_init_logger”

时间:2019-06-28 12:00:39

标签: python hyperledger hyperledger-indy

使用pip或pip3安装Hyperledger Indy节点时,在运行各种节点脚本(如init_indy_keys和start_indy_node)时会出现此错误。

您会得到类似

的输出

回溯(最近通话最近):     在第19行的文件“ / usr / local / bin / start_indy_node”       client_ip = sys.argv [4],client_port = int(sys.argv [5]))

File "/usr/local/lib/python3.6/dist-packages/indy_node/utils/node_runner.py", line 51, in run_node ha=node_ha, cliha=client_ha)

File "/usr/local/lib/python3.6/dist-packages/indy_node/server/node.py", line 101, in __init__    config=config)

File "/usr/local/lib/python3.6/dist-packages/plenum/server/node.py", line 216, in __init__    self.bls_bft = self._create_bls_bft()

File "/usr/local/lib/python3.6/dist-packages/plenum/server/node.py", line 1131, in _create_bls_bft    bls_bft = bls_factory.create_bls_bft()

File "/usr/local/lib/python3.6/dist-packages/crypto/bls/bls_factory.py", line 72, in create_bls_bft    bls_crypto_verifier = self._bls_factory_crypto.create_bls_crypto_verifier()

File "/usr/local/lib/python3.6/dist-packages/crypto/bls/bls_factory.py", line 36, in create_bls_crypto_verifier
return self._create_bls_crypto_verifier(group_params)

File "/usr/local/lib/python3.6/dist-packages/plenum/bls/bls_crypto_factory.py", line 24, in _create_bls_crypto_verifier
return BlsCryptoVerifierIndyCrypto(group_params)

File "/usr/local/lib/python3.6/dist-packages/crypto/bls/indy_crypto/bls_crypto_indy_crypto.py", line 67, in __init__
IndyCryptoBlsUtils.bls_from_str(params.g, Generator)  # type: Generator

File "/usr/local/lib/python3.6/dist-packages/crypto/bls/indy_crypto/bls_crypto_indy_crypto.py", line 42, in bls_from_str
return cls.from_bytes(bts)

File "/usr/local/lib/python3.6/dist-packages/indy_crypto/bls.py", line 34, in from_bytes
do_call(cls.from_bytes_handler, xbytes, len(xbytes), byref(c_instance))

File "/usr/local/lib/python3.6/dist-packages/indy_crypto/lib.py", line 12, in do_call    err = getattr(_cdll(), name)(*args)

File "/usr/local/lib/python3.6/dist-packages/indy_crypto/lib.py", line 22, in _cdll    _cdll.cdll = _load_cdll()

File "/usr/local/lib/python3.6/dist-packages/indy_crypto/lib.py", line 51, in _load_cdll    getattr(res, "indy_crypto_init_logger")()

File "/usr/lib/python3.6/ctypes/__init__.py", line 361, in __getattr__
func = self.__getitem__(name)

File "/usr/lib/python3.6/ctypes/__init__.py", line 366, in __getitem__
func = self._FuncPtr((name_or_ordinal, self))

AttributeError: /usr/lib/libindy_crypto.so: undefined symbol: indy_crypto_init_logger

这会导致您运行的命令无法成功完成

1 个答案:

答案 0 :(得分:0)

这是因为节点的python库和libindy-crypto库之间的配置不一致。例如,在安装pip3之后,您将拥有indy-node 1.8.1。但是,您的libindy-crypto版本可能是1.9.0和 函数名称在1.9.0中更改为indy_crypto_set_logger。

选择使用pip安装时,必须为libindy-crypto库指定一个与其余安装兼容的版本。

因此,不是发出

  

sudo apt-get install libindy-crypto   运行此命令   sudo apt-get install libindy-crypto = 0.4.5

您可以在以下URL上找到完整的示例指南以安装Indy节点: http://193.140.88.19/index.php/bag-hyperledger-indy-agina-katilim/