1. ホーム

WSLubuntuでESP8266のIDF版をビルドすると、「AttributeError: 'module' object has no attribute 'SSL_ST_INIT' 」というエラーが発生します。

2022-02-10 11:58:08

win10システムでubuntuをビルドしたのですが、Loxinから最新版のESP8266_RTOS_SDKを試そうとすると、エラー "AttributeError: 'module' object has no attribute 'SSL_ST_INIT' "が発生します。解決策は "sudo python -m easy_install --upgrade pyOpenSSL" と入力すると動きました。

Traceback (most recent call last):
  File "/usr/lib/python2.7/runpy.py", line 174, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "/usr/lib/python2.7/runpy.py", line 72, in _run_code
    exec code in run_globals
  File "/home/woody/.local/lib/python2.7/site-packages/pip/__main__.py", line 19, in <module>
    sys.exit(_main())
  File "/home/woody/.local/lib/python2.7/site-packages/pip/_internal/main.py", line 45, in main
    command = create_command(cmd_name, isolated=("--isolated" in cmd_args))
  File "/home/woody/.local/lib/python2.7/site-packages/pip/_internal/commands/__init__.py", line 96, in create_command
    module = importlib.import_module(module_path)
  File "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module
    __import__(name)
  File "/home/woody/.local/lib/python2.7/site-packages/pip/_internal/commands/install.py", line 23, in <module>
    from pip._internal.cli.req_command import RequirementCommand
  File "/home/woody/.local/lib/python2.7/site-packages/pip/_internal/cli/req_command.py", line 20, in <module>
    from pip._internal.network.session import PipSession
  File "/home/woody/.local/lib/python2.7/site-packages/pip/_internal/network/session.py", line 17, in <module>
    from pip._vendor import requests, six, urllib3
  File "/home/woody/.local/lib/python2.7/site-packages/pip/_vendor/requests/__init__.py", line 97, in <module>
    from pip._vendor.urllib3.contrib import pyopenssl
  File "/home/woody/.local/lib/python2.7/site-packages/pip/_vendor/urllib3/contrib/pyopenssl.py", line 46, in <module>
    import OpenSSL.
  File "/usr/lib/python2.7/dist-packages/OpenSSL/__init__.py", line 8, in <module>
    from OpenSSL import rand, crypto, SSL
  File "/usr/lib/python2.7/dist-packages/OpenSSL/SSL.py", line 118, in <module>
    SSL_ST_INIT = _lib.SSL_ST_INIT
AttributeError: 'module' object has no attribute 'SSL_ST_INIT'