- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我正在尝试将我的基础docker镜像从centos 7转换为alpine,但是在尝试安装pip软件包时收到gcc错误。
这是收到的错误的摘要:
Successfully built backports.ssl-match-hostname configobj dpkt iniparse IPy kitchen logmatic-python maxminddb NeuroTools procfs pycparser python-json-logger pyudev repoze.lru scandir scapy
Failed to build guppy kiwisolver numpy psutil pygpgme pyliblzma python-ldap pyxattr subprocess32
Installing collected packages: atomicwrites, attrs, backports.functools-lru-cache, backports.ssl-match-hostname, certifi, chardet, six, configobj, configparser, contextlib2, cycler, decorator, dnspython, dpkt, urllib3, elasticsearch, elasticsearch5, elasticsearch6, funcsigs, ipaddress, maxminddb, idna, requests, geoip2, guppy, scandir, pathlib2, more-itertools, zipp, importlib-metadata, iniparse, IPy, kafka, kafka-python, kitchen, kiwisolver, python-json-logger, logmatic-python, mock, NeuroTools, numpy, pyparsing, packaging, pbr, ptyprocess, pexpect, pluggy, ply, procfs, psutil, py, pyasn1, pyasn1-modules, pycparser, pygpgme, pyliblzma, wcwidth, pytest, python-dateutil, python-ldap, pytz, pyudev, pyxattr, redis, repoze.lru, scapy, subprocess32, xmltodict
Running setup.py install for guppy: started
Running setup.py install for guppy: finished with status 'error'
ERROR: Command errored out with exit status 1:
command: /usr/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-PWr6Cn/guppy/setup.py'"'"'; __file__='"'"'/tmp/pip-install-PWr6Cn/guppy/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-ogmKgm/install-record.txt --single-version-externally-managed --compile
cwd: /tmp/pip-install-PWr6Cn/guppy/
Complete output (117 lines):
running install
running build
running build_py
creating build
creating build/lib.linux-x86_64-2.7
creating build/lib.linux-x86_64-2.7/guppy
copying guppy/__init__.py -> build/lib.linux-x86_64-2.7/guppy
creating build/lib.linux-x86_64-2.7/guppy/doc
copying guppy/doc/docexample.py -> build/lib.linux-x86_64-2.7/guppy/doc
copying guppy/doc/test_heapyc.py -> build/lib.linux-x86_64-2.7/guppy/doc
copying guppy/doc/__init__.py -> build/lib.linux-x86_64-2.7/guppy/doc
copying guppy/doc/test_guppy.py -> build/lib.linux-x86_64-2.7/guppy/doc
copying guppy/doc/test_heapy.py -> build/lib.linux-x86_64-2.7/guppy/doc
creating build/lib.linux-x86_64-2.7/guppy/etc
copying guppy/etc/Code.py -> build/lib.linux-x86_64-2.7/guppy/etc
copying guppy/etc/Cat.py -> build/lib.linux-x86_64-2.7/guppy/etc
copying guppy/etc/IterPermute.py -> build/lib.linux-x86_64-2.7/guppy/etc
copying guppy/etc/OutputHandling.py -> build/lib.linux-x86_64-2.7/guppy/etc
copying guppy/etc/KnuthBendix.py -> build/lib.linux-x86_64-2.7/guppy/etc
copying guppy/etc/KanExtension.py -> build/lib.linux-x86_64-2.7/guppy/etc
copying guppy/etc/Unpack.py -> build/lib.linux-x86_64-2.7/guppy/etc
copying guppy/etc/__init__.py -> build/lib.linux-x86_64-2.7/guppy/etc
copying guppy/etc/FSA.py -> build/lib.linux-x86_64-2.7/guppy/etc
copying guppy/etc/tkcursors.py -> build/lib.linux-x86_64-2.7/guppy/etc
copying guppy/etc/cmd.py -> build/lib.linux-x86_64-2.7/guppy/etc
copying guppy/etc/xterm.py -> build/lib.linux-x86_64-2.7/guppy/etc
copying guppy/etc/etc.py -> build/lib.linux-x86_64-2.7/guppy/etc
copying guppy/etc/ExecfileWithModuleInfo.py -> build/lib.linux-x86_64-2.7/guppy/etc
copying guppy/etc/Help.py -> build/lib.linux-x86_64-2.7/guppy/etc
copying guppy/etc/RE.py -> build/lib.linux-x86_64-2.7/guppy/etc
copying guppy/etc/RE_Rect.py -> build/lib.linux-x86_64-2.7/guppy/etc
copying guppy/etc/Glue.py -> build/lib.linux-x86_64-2.7/guppy/etc
copying guppy/etc/textView.py -> build/lib.linux-x86_64-2.7/guppy/etc
copying guppy/etc/Compat.py -> build/lib.linux-x86_64-2.7/guppy/etc
creating build/lib.linux-x86_64-2.7/guppy/gsl
copying guppy/gsl/Html.py -> build/lib.linux-x86_64-2.7/guppy/gsl
copying guppy/gsl/Latex.py -> build/lib.linux-x86_64-2.7/guppy/gsl
copying guppy/gsl/DottedTree.py -> build/lib.linux-x86_64-2.7/guppy/gsl
copying guppy/gsl/Main.py -> build/lib.linux-x86_64-2.7/guppy/gsl
copying guppy/gsl/FileIO.py -> build/lib.linux-x86_64-2.7/guppy/gsl
copying guppy/gsl/Filer.py -> build/lib.linux-x86_64-2.7/guppy/gsl
copying guppy/gsl/__init__.py -> build/lib.linux-x86_64-2.7/guppy/gsl
copying guppy/gsl/XHTML.py -> build/lib.linux-x86_64-2.7/guppy/gsl
copying guppy/gsl/Text.py -> build/lib.linux-x86_64-2.7/guppy/gsl
copying guppy/gsl/Document.py -> build/lib.linux-x86_64-2.7/guppy/gsl
copying guppy/gsl/Gsml.py -> build/lib.linux-x86_64-2.7/guppy/gsl
copying guppy/gsl/Help.py -> build/lib.linux-x86_64-2.7/guppy/gsl
copying guppy/gsl/Exceptions.py -> build/lib.linux-x86_64-2.7/guppy/gsl
copying guppy/gsl/Tester.py -> build/lib.linux-x86_64-2.7/guppy/gsl
copying guppy/gsl/SpecNodes.py -> build/lib.linux-x86_64-2.7/guppy/gsl
creating build/lib.linux-x86_64-2.7/guppy/heapy
copying guppy/heapy/Spec.py -> build/lib.linux-x86_64-2.7/guppy/heapy
copying guppy/heapy/OutputHandling.py -> build/lib.linux-x86_64-2.7/guppy/heapy
copying guppy/heapy/Remote.py -> build/lib.linux-x86_64-2.7/guppy/heapy
copying guppy/heapy/RefPat.py -> build/lib.linux-x86_64-2.7/guppy/heapy
copying guppy/heapy/ImpSet.py -> build/lib.linux-x86_64-2.7/guppy/heapy
copying guppy/heapy/Monitor.py -> build/lib.linux-x86_64-2.7/guppy/heapy
copying guppy/heapy/Classifiers.py -> build/lib.linux-x86_64-2.7/guppy/heapy
copying guppy/heapy/__init__.py -> build/lib.linux-x86_64-2.7/guppy/heapy
copying guppy/heapy/RM.py -> build/lib.linux-x86_64-2.7/guppy/heapy
copying guppy/heapy/UniSet.py -> build/lib.linux-x86_64-2.7/guppy/heapy
copying guppy/heapy/View.py -> build/lib.linux-x86_64-2.7/guppy/heapy
copying guppy/heapy/Target.py -> build/lib.linux-x86_64-2.7/guppy/heapy
copying guppy/heapy/Doc.py -> build/lib.linux-x86_64-2.7/guppy/heapy
copying guppy/heapy/Prof.py -> build/lib.linux-x86_64-2.7/guppy/heapy
copying guppy/heapy/Part.py -> build/lib.linux-x86_64-2.7/guppy/heapy
copying guppy/heapy/Console.py -> build/lib.linux-x86_64-2.7/guppy/heapy
copying guppy/heapy/Use.py -> build/lib.linux-x86_64-2.7/guppy/heapy
copying guppy/heapy/Path.py -> build/lib.linux-x86_64-2.7/guppy/heapy
copying guppy/heapy/AbstractAlgebra.py -> build/lib.linux-x86_64-2.7/guppy/heapy
copying guppy/heapy/RemoteConstants.py -> build/lib.linux-x86_64-2.7/guppy/heapy
copying guppy/heapy/pbhelp.py -> build/lib.linux-x86_64-2.7/guppy/heapy
creating build/lib.linux-x86_64-2.7/guppy/heapy/test
copying guppy/heapy/test/test_Classifiers.py -> build/lib.linux-x86_64-2.7/guppy/heapy/test
copying guppy/heapy/test/test_sf.py -> build/lib.linux-x86_64-2.7/guppy/heapy/test
copying guppy/heapy/test/test_heapyc.py -> build/lib.linux-x86_64-2.7/guppy/heapy/test
copying guppy/heapy/test/test_OutputHandling.py -> build/lib.linux-x86_64-2.7/guppy/heapy/test
copying guppy/heapy/test/test_Spec.py -> build/lib.linux-x86_64-2.7/guppy/heapy/test
copying guppy/heapy/test/__init__.py -> build/lib.linux-x86_64-2.7/guppy/heapy/test
copying guppy/heapy/test/test_View.py -> build/lib.linux-x86_64-2.7/guppy/heapy/test
copying guppy/heapy/test/test_Path.py -> build/lib.linux-x86_64-2.7/guppy/heapy/test
copying guppy/heapy/test/test_UniSet.py -> build/lib.linux-x86_64-2.7/guppy/heapy/test
copying guppy/heapy/test/test_menuleak.py -> build/lib.linux-x86_64-2.7/guppy/heapy/test
copying guppy/heapy/test/test_dependencies.py -> build/lib.linux-x86_64-2.7/guppy/heapy/test
copying guppy/heapy/test/test_RetaGraph.py -> build/lib.linux-x86_64-2.7/guppy/heapy/test
copying guppy/heapy/test/test_Part.py -> build/lib.linux-x86_64-2.7/guppy/heapy/test
copying guppy/heapy/test/test_all.py -> build/lib.linux-x86_64-2.7/guppy/heapy/test
copying guppy/heapy/test/test_RefPat.py -> build/lib.linux-x86_64-2.7/guppy/heapy/test
copying guppy/heapy/test/test_ER.py -> build/lib.linux-x86_64-2.7/guppy/heapy/test
copying guppy/heapy/test/support.py -> build/lib.linux-x86_64-2.7/guppy/heapy/test
creating build/lib.linux-x86_64-2.7/guppy/sets
copying guppy/sets/test.py -> build/lib.linux-x86_64-2.7/guppy/sets
copying guppy/sets/__init__.py -> build/lib.linux-x86_64-2.7/guppy/sets
copying guppy/doc/gsl.html -> build/lib.linux-x86_64-2.7/guppy/doc
copying guppy/doc/heapy_UniSet.html -> build/lib.linux-x86_64-2.7/guppy/doc
copying guppy/doc/sets.html -> build/lib.linux-x86_64-2.7/guppy/doc
copying guppy/doc/heapyc.html -> build/lib.linux-x86_64-2.7/guppy/doc
copying guppy/doc/guppy.html -> build/lib.linux-x86_64-2.7/guppy/doc
copying guppy/doc/ProfileBrowser.html -> build/lib.linux-x86_64-2.7/guppy/doc
copying guppy/doc/heapy_tutorial.html -> build/lib.linux-x86_64-2.7/guppy/doc
copying guppy/doc/index.html -> build/lib.linux-x86_64-2.7/guppy/doc
copying guppy/doc/docexample.html -> build/lib.linux-x86_64-2.7/guppy/doc
copying guppy/doc/heapy_Use.html -> build/lib.linux-x86_64-2.7/guppy/doc
copying guppy/doc/gslexample.html -> build/lib.linux-x86_64-2.7/guppy/doc
copying guppy/doc/heapy_RootState.html -> build/lib.linux-x86_64-2.7/guppy/doc
copying guppy/doc/pbscreen.jpg -> build/lib.linux-x86_64-2.7/guppy/doc
running build_ext
building 'guppy.sets.setsc' extension
creating build/temp.linux-x86_64-2.7
creating build/temp.linux-x86_64-2.7/src
creating build/temp.linux-x86_64-2.7/src/sets
gcc -fno-strict-aliasing -Os -fomit-frame-pointer -g -DNDEBUG -Os -fomit-frame-pointer -g -DTHREAD_STACK_SIZE=0x100000 -fPIC -I/usr/include/python2.7 -c src/sets/sets.c -o build/temp.linux-x86_64-2.7/src/sets/sets.o
src/sets/sets.c:33:10: fatal error: Python.h: No such file or directory
#include "Python.h"
^~~~~~~~~~
compilation terminated.
error: command 'gcc' failed with exit status 1
----------------------------------------
ERROR: Command errored out with exit status 1: /usr/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-PWr6Cn/guppy/setup.py'"'"'; __file__='"'"'/tmp/pip-install-PWr6Cn/guppy/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-ogmKgm/install-record.txt --single-version-externally-managed --compile Check the logs for full command output.
The command '/bin/sh -c pip install -r /home/admin/container_files/requirements.txt' returned a non-zero code: 1
FROM alpine:latest
RUN apk update && apk upgrade
RUN apk add --no-cache bash\
python \
pkgconfig \
git \
gcc \
openldap \
libcurl \
&& rm -rf /var/cache/apk/*
RUN wget https://bootstrap.pypa.io/get-pip.py && python get-pip.py
ADD requirements.txt /home/admin/container_files/
RUN pip install setuptools==30.1.0
RUN pip install -r /home/admin/container_files/requirements.txt
pip install -r requirements.txt
行会导致生成图像。 ssh'进入图像实例后,确实安装了gcc,但是我不确定为什么会在上面出现错误:
$ docker run -it alpine-image bash
bash-5.0# gcc --version
gcc (Alpine 8.3.0) 8.3.0
Copyright (C) 2018 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
bash-5.0# pip install pygpgme
Collecting pygpgme
Using cached https://files.pythonhosted.org/packages/dc/96/b2bcbd3a216af313bb9045c2e573aa18653876a65db471b86be7598234dd/pygpgme-0.3.tar.gz
Building wheels for collected packages: pygpgme
Building wheel for pygpgme (setup.py) ... error
ERROR: Command errored out with exit status 1:
command: /usr/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-ih85iq/pygpgme/setup.py'"'"'; __file__='"'"'/tmp/pip-install-ih85iq/pygpgme/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-1HBTfc --python-tag cp27
cwd: /tmp/pip-install-ih85iq/pygpgme/
Complete output (18 lines):
running bdist_wheel
running build
running build_py
creating build
creating build/lib.linux-x86_64-2.7
creating build/lib.linux-x86_64-2.7/gpgme
copying gpgme/__init__.py -> build/lib.linux-x86_64-2.7/gpgme
copying gpgme/editutil.py -> build/lib.linux-x86_64-2.7/gpgme
running build_ext
building 'gpgme._gpgme' extension
creating build/temp.linux-x86_64-2.7
creating build/temp.linux-x86_64-2.7/src
gcc -fno-strict-aliasing -Os -fomit-frame-pointer -g -DNDEBUG -Os -fomit-frame-pointer -g -DTHREAD_STACK_SIZE=0x100000 -fPIC -I/usr/include/python2.7 -c src/gpgme.c -o build/temp.linux-x86_64-2.7/src/gpgme.o
src/gpgme.c:21:10: fatal error: Python.h: No such file or directory
#include <Python.h>
^~~~~~~~~~
compilation terminated.
error: command 'gcc' failed with exit status 1
----------------------------------------
ERROR: Failed building wheel for pygpgme
Running setup.py clean for pygpgme
Failed to build pygpgme
Installing collected packages: pygpgme
Running setup.py install for pygpgme ... error
ERROR: Command errored out with exit status 1:
command: /usr/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-ih85iq/pygpgme/setup.py'"'"'; __file__='"'"'/tmp/pip-install-ih85iq/pygpgme/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-1HWn3q/install-record.txt --single-version-externally-managed --compile
cwd: /tmp/pip-install-ih85iq/pygpgme/
Complete output (18 lines):
running install
running build
running build_py
creating build
creating build/lib.linux-x86_64-2.7
creating build/lib.linux-x86_64-2.7/gpgme
copying gpgme/__init__.py -> build/lib.linux-x86_64-2.7/gpgme
copying gpgme/editutil.py -> build/lib.linux-x86_64-2.7/gpgme
running build_ext
building 'gpgme._gpgme' extension
creating build/temp.linux-x86_64-2.7
creating build/temp.linux-x86_64-2.7/src
gcc -fno-strict-aliasing -Os -fomit-frame-pointer -g -DNDEBUG -Os -fomit-frame-pointer -g -DTHREAD_STACK_SIZE=0x100000 -fPIC -I/usr/include/python2.7 -c src/gpgme.c -o build/temp.linux-x86_64-2.7/src/gpgme.o
src/gpgme.c:21:10: fatal error: Python.h: No such file or directory
#include <Python.h>
^~~~~~~~~~
compilation terminated.
error: command 'gcc' failed with exit status 1
----------------------------------------
ERROR: Command errored out with exit status 1: /usr/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-ih85iq/pygpgme/setup.py'"'"'; __file__='"'"'/tmp/pip-install-ih85iq/pygpgme/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-1HWn3q/install-record.txt --single-version-externally-managed --compile Check the logs for full command output.
最佳答案
缺少头文件Python.h
,此文件由python2-dev
提供(-dev
是用于进行开发的软件包)。
使用此https://pkgs.alpinelinux.org/contents,您可以搜索所有具有Python.h
的软件包
通过添加以下3个程序包,我能够运行pip install pygpgme
:
Dockerfile
将为:
FROM alpine:latest
RUN apk update && apk upgrade
RUN apk add --no-cache bash\
python \
pkgconfig \
git \
gcc \
openldap \
libcurl \
python2-dev \
gpgme-dev \
libc-dev \
&& rm -rf /var/cache/apk/*
RUN wget https://bootstrap.pypa.io/get-pip.py && python get-pip.py
RUN pip install setuptools==30.1.0
关于docker - 错误: command 'gcc' failed with exit status 1 when installing pip packages on alpine docker imag,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58629049/
所以最近(9 月 5 日)Alpine Linux 软件包仓库更新为 postgresql-client 12.4 我在我的 Dockerfile ( apk add postgresql-clien
当我运行 apk add --update ab 时出现错误: bash-4.3# apk add --update ab fetch http://dl-cdn.alpinelinux.org/al
关闭。这个问题不满足Stack Overflow guidelines .它目前不接受答案。 想改善这个问题吗?更新问题,使其成为 on-topic对于堆栈溢出。 9 个月前关闭。 Improve t
我有一个在 Alpine 发行版上运行的 docker 镜像,为了让我的一个要求工作 - pocketsphinx==0.1.15,我必须在我的 DockerFile 中安装一些依赖项: FROM p
我已按照以下步骤创建自定义 rootfs 镜像以使用 firecracker 启动:- https://github.com/firecracker-microvm/firecracker/blob/
关闭。这个问题不符合Stack Overflow guidelines .它目前不接受答案。 这个问题似乎不是关于 a specific programming problem, a softwar
我正在使用 alpine(最低 3.5)并且我需要使用 nodeJS 4.8.4 Docker 文件 FROM alpine:3.5 RUN apk add --update nodejs=4.8.4
使用 ruby-2.6.6-alpine 的 Docker 镜像创建了一个 498mb 的镜像大小。但是,当我降级到 ruby-2.6.5-alpine 时,它又回到了 266mb。 2.
我尝试在php:7.0-fpm-alpine上安装bz2扩展(基于Alpine 3.4): FROM php:7.0-fpm-alpine RUN docker-php-ext-install bz2
1、运行 fonts ,打开字体文件夹,找到要用的字体文件; 2、修改Dockerfile,例如: ?
我有这个Dockerfile ... FROM keymetrics/pm2:latest-alpine RUN apk update && \ apk upgrade && \ ap
我已经阅读了很多有关Docker容器和Unikernel的知识,以及如何在自己的应用程序中运行轻量级环境。 我知道Linux容器和Unikernel是不同的东西,因为第一个是内核功能(例如 names
我有一个 docker 镜像 nginx:stable-alpine,我需要使用 nginx-extras 为了使用 rewrite_by_lua指示。 我尝试通过 apk add --cached
堆高车 我正在使用Docker容器化我的应用程序。在下面的stage中,我尝试使用UPX对其进行打包。 FROM alpine:3.8 AS compressor # Version of upx t
我在CI / CD机器上使用Alpine linux。下面的docker文件: FROM node:10.15-alpine RUN npm i -g sequelize sequelize-cli
我正在尝试使用 The Badass Runtime Plugin 创建自定义运行时图像然后在 Alpine 上执行它。但它失败并显示以下错误消息。 jibcmd_1 | /bin/sh: exec
如何为所有语言安装字体?这是我的工作,但是Chrome中没有日语字体。 从此图像:https://github.com/Zenika/alpine-chrome/blob/master/Dockerf
是否可以在 Alpine Linux 中的 less 命令上启用鼠标滚动? 我尝试过使用 export LESS=-R 但没有任何作用。 最佳答案 Alpine 上默认的 less 由 BusyBox
我正在尝试在 alpine 中安装一个包,在本例中我指定了“jasper-dev”,但我和其他许多人都遇到过这种情况。我在终端中得到的输出是: / # apk add jasper-dev ERROR
当尝试安装 pdftk apk 时抛出此错误。 ERROR: unsatisfiable constraints: pdftk (missing): required by: world[
我是一名优秀的程序员,十分优秀!