未能在debian上安装PythonPubububub客户端构建控制盘失败

2024-09-28 19:33:54 发布

您现在位置:Python中文网/ 问答频道 /正文

我试图在debian上安装python pubsub客户端,但遇到一个错误:

 Running setup.py bdist_wheel for google-crc32c: started
  Running setup.py bdist_wheel for google-crc32c: finished with status 'error'
  Complete output from command /usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-8hoi9wfs/google-crc32c/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d /tmp/pip-wheel-8c4x0z46 --python-tag cp37:  src/google_crc32c/_crc32c.c:3:10: fatal error: crc32c/crc32c.h: No such file or directory
   #include <crc32c/crc32c.h>
            ^~~~~~~~~~~~~~~~~
  compilation terminated.
  error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
  
  ----------------------------------------
  Failed building wheel for google-crc32c
  Running setup.py clean for google-crc32c
Successfully built python-multipart aiohttp uvloop hkdf ByteBuffer grpc-google-iam-v1 grpcio multidict yarl protobuf3
Failed to build google-crc32c
86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/python3.7m -c src/google_crc32c/_crc32c.c -o build/temp.linux-x86_64-3.7/src/google_crc32c/_crc32c.o
    src/google_crc32c/_crc32c.c:3:10: fatal error: crc32c/crc32c.h: No such file or directory
     #include <crc32c/crc32c.h>
              ^~~~~~~~~~~~~~~~~
    compilation terminated.
    error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
    
    ----------------------------------------
Command "/usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-2lr8_usl/google-crc32c/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-record-tovyl8as/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-install-2lr8_usl/google-crc32c/

试图添加:

RUN apt-get update && apt-get install -y build-essential
RUN apt-get update && apt-get install -y python3 python3-pip python3-dev gcc python3-setuptools libssl-dev libffi-dev 

但还是没有运气,你知道为什么失败吗


Tags: installpippyforwithgooglesetupcode