Lui*_*ock 3 pycrypto python-3.x docker dockerfile
我正在AWS lambda 上使用Pychromeless 存储库并取得成功。
\n\n但现在我需要使用 pycrypto 依赖项,但我得到了
\n\nconfigure: error: no acceptable C compiler found in $PATH\n\xc2\xa0\n运行时make docker-build\n(放入文件后pycrypto==2.6.1)requirements.txt。
有这个线程,有人提到了同样的问题:\n\xc2\xa0
\n\n“gcc 编译器不在您的 $PATH 中。这意味着您没有安装 gcc,或者它不在您的 $PATH 变量中”。
\n\n所以尝试放置apt-get install build-essential在 Dockerfile 中,但我得到了
/bin/sh: apt-get: command not found
然后,我尝试使用\xc2\xa0yum install gcc
只为得到
\n\nThe command \'/bin/sh -c yum install gcc\' returned a non-zero code: 1
Docker-lambda [信息页面](https://hub.docker.com/r/lambci/lambda/)说:
\n\nThis project consists of a set of Docker images for each of the supported Lambda runtimes.\n\nThere are also a set of build images that include packages like gcc-c++, git, zip and the aws-cli for compiling and deploying.\nRun Code Online (Sandbox Code Playgroud)\n\n所以我想我不需要安装 gcc。也许 gcc 编译器不在 $PATH 中,但我不知道该怎么解决这个问题。
\n\n这是 dockerfile
\n\nFROM lambci/lambda:python3.6\nMAINTAINER tech@21buttons.com\n\nUSER root\n\nENV APP_DIR /var/task\n\nWORKDIR $APP_DIR\n\nCOPY requirements.txt .\nCOPY bin ./bin\nCOPY lib ./lib\n\nRUN mkdir -p $APP_DIR/lib\nRUN pip3 install -r requirements.txt -t /var/task/lib\nRun Code Online (Sandbox Code Playgroud)\n\n有什么帮助解决这个问题吗?
\n| 归档时间: |
|
| 查看次数: |
1652 次 |
| 最近记录: |