aiortc / aioquic

QUIC and HTTP/3 implementation in Python

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

install error

spwpun opened this issue · comments

commented

I have met this error when I try to install aioquic 0.9.20

Install commands which encouter error:

apt install libssl-dev python3-dev
git checkout 0.9.20
pip install -e .

The error:

Looking in indexes: https://pypi.douban.com/simple/
Obtaining file:///root/Requirements/aioquic
Requirement already satisfied: certifi in /usr/local/lib/python3.8/dist-packages (from aioquic==0.9.20) (2022.12.7)
Requirement already satisfied: cryptography>=3.1 in /usr/local/lib/python3.8/dist-packages (from aioquic==0.9.20) (38.0.4)
Requirement already satisfied: pylsqpack<0.4.0,>=0.3.3 in /usr/local/lib/python3.8/dist-packages (from aioquic==0.9.20) (0.3.16)
Requirement already satisfied: pyopenssl>=20 in /usr/local/lib/python3.8/dist-packages (from aioquic==0.9.20) (21.0.0)
Requirement already satisfied: cffi>=1.12 in /usr/local/lib/python3.8/dist-packages (from cryptography>=3.1->aioquic==0.9.20) (1.15.1)
Requirement already satisfied: six>=1.5.2 in /usr/local/lib/python3.8/dist-packages (from pyopenssl>=20->aioquic==0.9.20) (1.16.0)
Requirement already satisfied: pycparser in /usr/local/lib/python3.8/dist-packages (from cffi>=1.12->cryptography>=3.1->aioquic==0.9.20) (2.21)
Installing collected packages: aioquic
  Running setup.py develop for aioquic
    ERROR: Command errored out with exit status 1:
     command: /usr/bin/python3 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/root/Requirements/aioquic/setup.py'"'"'; __file__='"'"'/root/Requirements/aioquic/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' develop --no-deps
         cwd: /root/Requirements/aioquic/
    Complete output (33 lines):
    running develop
    running egg_info
    writing src/aioquic.egg-info/PKG-INFO
    writing dependency_links to src/aioquic.egg-info/dependency_links.txt
    writing requirements to src/aioquic.egg-info/requires.txt
    writing top-level names to src/aioquic.egg-info/top_level.txt
    reading manifest file 'src/aioquic.egg-info/SOURCES.txt'
    reading manifest template 'MANIFEST.in'
    writing manifest file 'src/aioquic.egg-info/SOURCES.txt'
    running build_ext
    building 'aioquic._crypto' extension
    x86_64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/python3.8 -c src/aioquic/_crypto.c -o build/temp.linux-x86_64-3.8/src/aioquic/_crypto.o -std=c99
    src/aioquic/_crypto.c: In function ‘create_ctx’:
    src/aioquic/_crypto.c:60:36: error: ‘EVP_CTRL_CCM_SET_IVLEN’ undeclared (first use in this function); did you mean ‘EVP_CTRL_GCM_SET_IVLEN’?
       60 |     res = EVP_CIPHER_CTX_ctrl(ctx, EVP_CTRL_CCM_SET_IVLEN, AEAD_NONCE_LENGTH, NULL);
          |                                    ^~~~~~~~~~~~~~~~~~~~~~
          |                                    EVP_CTRL_GCM_SET_IVLEN
    src/aioquic/_crypto.c:60:36: note: each undeclared identifier is reported only once for each function it appears in
    src/aioquic/_crypto.c: In function ‘AEAD_decrypt’:
    src/aioquic/_crypto.c:131:50: error: ‘EVP_CTRL_CCM_SET_TAG’ undeclared (first use in this function); did you mean ‘EVP_CTRL_GCM_SET_TAG’?
      131 |     res = EVP_CIPHER_CTX_ctrl(self->decrypt_ctx, EVP_CTRL_CCM_SET_TAG, AEAD_TAG_LENGTH, (void*)(data + (data_len - AEAD_TAG_LENGTH)));
          |                                                  ^~~~~~~~~~~~~~~~~~~~
          |                                                  EVP_CTRL_GCM_SET_TAG
    src/aioquic/_crypto.c: In function ‘AEAD_encrypt’:
    src/aioquic/_crypto.c:185:50: error: ‘EVP_CTRL_CCM_GET_TAG’ undeclared (first use in this function); did you mean ‘EVP_CTRL_GCM_GET_TAG’?
      185 |     res = EVP_CIPHER_CTX_ctrl(self->encrypt_ctx, EVP_CTRL_CCM_GET_TAG, AEAD_TAG_LENGTH, self->buffer + outlen);
          |                                                  ^~~~~~~~~~~~~~~~~~~~
          |                                                  EVP_CTRL_GCM_GET_TAG
    src/aioquic/_crypto.c: In function ‘PyInit__crypto’:
    src/aioquic/_crypto.c:451:5: warning: implicit declaration of function ‘EVP_add_cipher’ [-Wimplicit-function-declaration]
      451 |     EVP_add_cipher(EVP_aes_128_ecb());
          |     ^~~~~~~~~~~~~~
    error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
    ----------------------------------------
ERROR: Command errored out with exit status 1: /usr/bin/python3 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/root/Requirements/aioquic/setup.py'"'"'; __file__='"'"'/root/Requirements/aioquic/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' develop --no-deps Check the logs for full command output.

My envs:

  • Python 3.8.10
  • OpenSSL 1.1.1f 31 Mar 2020
commented

OK,I solved this issue mannually update the openssl version to the latest(1.1.1t).