- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
在亚马逊 ec2 实例上安装 lxml 时遇到问题。
你能帮我解决这个问题吗?根据wordsize.h的问题,我认为可能是gcc安装方式的问题,但我也不知道。
任何帮助将不胜感激。
$ sudo pip install lxml
Downloading/unpacking lxml
Downloading lxml-3.3.0.tar.gz (3.4MB): 3.4MB downloaded
Running setup.py (path:/tmp/pip_build_root/lxml/setup.py) egg_info for package lxml
/usr/lib64/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'bugtrack_url'
warnings.warn(msg)
Building lxml version 3.3.0.
Building without Cython.
Using build configuration of libxslt 1.1.26
Building against libxml2/libxslt in the following directory: /usr/lib64
warning: no previously-included files found matching '*.py'
Installing collected packages: lxml
Running setup.py install for lxml
/usr/lib64/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'bugtrack_url'
warnings.warn(msg)
Building lxml version 3.3.0.
Building without Cython.
Using build configuration of libxslt 1.1.26
Building against libxml2/libxslt in the following directory: /usr/lib64
building 'lxml.etree' extension
gcc -pthread -fno-strict-aliasing -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC -I/usr/include/libxml2 -I/tmp/pip_build_root/lxml/src/lxml/includes -I/usr/include/python2.7 -c src/lxml/lxml.etree.c -o build/temp.linux-x86_64-2.7/src/lxml/lxml.etree.o -w
In file included from src/lxml/lxml.etree.c:8:0:
/usr/include/python2.7/pyconfig.h:1:27: fatal error: bits/wordsize.h: No such file or directory
compilation terminated.
error: command 'gcc' failed with exit status 1
Complete output from command /usr/bin/python27 -c "import setuptools, tokenize;__file__='/tmp/pip_build_root/lxml/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-_eECL7-record/install-record.txt --single-version-externally-managed --compile:
/usr/lib64/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'bugtrack_url'
warnings.warn(msg)
Building lxml version 3.3.0.
Building without Cython.
Using build configuration of libxslt 1.1.26
Building against libxml2/libxslt in the following directory: /usr/lib64
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/lxml
copying src/lxml/ElementInclude.py -> build/lib.linux-x86_64-2.7/lxml
copying src/lxml/usedoctest.py -> build/lib.linux-x86_64-2.7/lxml
copying src/lxml/sax.py -> build/lib.linux-x86_64-2.7/lxml
copying src/lxml/doctestcompare.py -> build/lib.linux-x86_64-2.7/lxml
copying src/lxml/pyclasslookup.py -> build/lib.linux-x86_64-2.7/lxml
copying src/lxml/cssselect.py -> build/lib.linux-x86_64-2.7/lxml
copying src/lxml/__init__.py -> build/lib.linux-x86_64-2.7/lxml
copying src/lxml/builder.py -> build/lib.linux-x86_64-2.7/lxml
copying src/lxml/_elementpath.py -> build/lib.linux-x86_64-2.7/lxml
creating build/lib.linux-x86_64-2.7/lxml/includes
copying src/lxml/includes/__init__.py -> build/lib.linux-x86_64-2.7/lxml/includes
creating build/lib.linux-x86_64-2.7/lxml/html
copying src/lxml/html/ElementSoup.py -> build/lib.linux-x86_64-2.7/lxml/html
copying src/lxml/html/usedoctest.py -> build/lib.linux-x86_64-2.7/lxml/html
copying src/lxml/html/_diffcommand.py -> build/lib.linux-x86_64-2.7/lxml/html
copying src/lxml/html/diff.py -> build/lib.linux-x86_64-2.7/lxml/html
copying src/lxml/html/_setmixin.py -> build/lib.linux-x86_64-2.7/lxml/html
copying src/lxml/html/_html5builder.py -> build/lib.linux-x86_64-2.7/lxml/html
copying src/lxml/html/soupparser.py -> build/lib.linux-x86_64-2.7/lxml/html
copying src/lxml/html/html5parser.py -> build/lib.linux-x86_64-2.7/lxml/html
copying src/lxml/html/defs.py -> build/lib.linux-x86_64-2.7/lxml/html
copying src/lxml/html/__init__.py -> build/lib.linux-x86_64-2.7/lxml/html
copying src/lxml/html/formfill.py -> build/lib.linux-x86_64-2.7/lxml/html
copying src/lxml/html/clean.py -> build/lib.linux-x86_64-2.7/lxml/html
copying src/lxml/html/builder.py -> build/lib.linux-x86_64-2.7/lxml/html
creating build/lib.linux-x86_64-2.7/lxml/isoschematron
copying src/lxml/isoschematron/__init__.py -> build/lib.linux-x86_64-2.7/lxml/isoschematron
copying src/lxml/lxml.etree.h -> build/lib.linux-x86_64-2.7/lxml
copying src/lxml/lxml.etree_api.h -> build/lib.linux-x86_64-2.7/lxml
copying src/lxml/includes/config.pxd -> build/lib.linux-x86_64-2.7/lxml/includes
copying src/lxml/includes/relaxng.pxd -> build/lib.linux-x86_64-2.7/lxml/includes
copying src/lxml/includes/xinclude.pxd -> build/lib.linux-x86_64-2.7/lxml/includes
copying src/lxml/includes/xpath.pxd -> build/lib.linux-x86_64-2.7/lxml/includes
copying src/lxml/includes/dtdvalid.pxd -> build/lib.linux-x86_64-2.7/lxml/includes
copying src/lxml/includes/schematron.pxd -> build/lib.linux-x86_64-2.7/lxml/includes
copying src/lxml/includes/htmlparser.pxd -> build/lib.linux-x86_64-2.7/lxml/includes
copying src/lxml/includes/uri.pxd -> build/lib.linux-x86_64-2.7/lxml/includes
copying src/lxml/includes/etreepublic.pxd -> build/lib.linux-x86_64-2.7/lxml/includes
copying src/lxml/includes/tree.pxd -> build/lib.linux-x86_64-2.7/lxml/includes
copying src/lxml/includes/xmlschema.pxd -> build/lib.linux-x86_64-2.7/lxml/includes
copying src/lxml/includes/xslt.pxd -> build/lib.linux-x86_64-2.7/lxml/includes
copying src/lxml/includes/xmlparser.pxd -> build/lib.linux-x86_64-2.7/lxml/includes
copying src/lxml/includes/xmlerror.pxd -> build/lib.linux-x86_64-2.7/lxml/includes
copying src/lxml/includes/c14n.pxd -> build/lib.linux-x86_64-2.7/lxml/includes
copying src/lxml/includes/etree_defs.h -> build/lib.linux-x86_64-2.7/lxml/includes
copying src/lxml/includes/lxml-version.h -> build/lib.linux-x86_64-2.7/lxml/includes
creating build/lib.linux-x86_64-2.7/lxml/isoschematron/resources
creating build/lib.linux-x86_64-2.7/lxml/isoschematron/resources/rng
copying src/lxml/isoschematron/resources/rng/iso-schematron.rng -> build/lib.linux-x86_64-2.7/lxml/isoschematron/resources/rng
creating build/lib.linux-x86_64-2.7/lxml/isoschematron/resources/xsl
copying src/lxml/isoschematron/resources/xsl/XSD2Schtrn.xsl -> build/lib.linux-x86_64-2.7/lxml/isoschematron/resources/xsl
copying src/lxml/isoschematron/resources/xsl/RNG2Schtrn.xsl -> build/lib.linux-x86_64-2.7/lxml/isoschematron/resources/xsl
creating build/lib.linux-x86_64-2.7/lxml/isoschematron/resources/xsl/iso-schematron-xslt1
copying src/lxml/isoschematron/resources/xsl/iso-schematron-xslt1/iso_schematron_skeleton_for_xslt1.xsl -> build/lib.linux-x86_64-2.7/lxml/isoschematron/resources/xsl/iso-schematron-xslt1
copying src/lxml/isoschematron/resources/xsl/iso-schematron-xslt1/iso_schematron_message.xsl -> build/lib.linux-x86_64-2.7/lxml/isoschematron/resources/xsl/iso-schematron-xslt1
copying src/lxml/isoschematron/resources/xsl/iso-schematron-xslt1/iso_dsdl_include.xsl -> build/lib.linux-x86_64-2.7/lxml/isoschematron/resources/xsl/iso-schematron-xslt1
copying src/lxml/isoschematron/resources/xsl/iso-schematron-xslt1/iso_svrl_for_xslt1.xsl -> build/lib.linux-x86_64-2.7/lxml/isoschematron/resources/xsl/iso-schematron-xslt1
copying src/lxml/isoschematron/resources/xsl/iso-schematron-xslt1/iso_abstract_expand.xsl -> build/lib.linux-x86_64-2.7/lxml/isoschematron/resources/xsl/iso-schematron-xslt1
copying src/lxml/isoschematron/resources/xsl/iso-schematron-xslt1/readme.txt -> build/lib.linux-x86_64-2.7/lxml/isoschematron/resources/xsl/iso-schematron-xslt1
running build_ext
building 'lxml.etree' 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/lxml
gcc -pthread -fno-strict-aliasing -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC -I/usr/include/libxml2 -I/tmp/pip_build_root/lxml/src/lxml/includes -I/usr/include/python2.7 -c src/lxml/lxml.etree.c -o build/temp.linux-x86_64-2.7/src/lxml/lxml.etree.o -w
In file included from src/lxml/lxml.etree.c:8:0:
/usr/include/python2.7/pyconfig.h:1:27: fatal error: bits/wordsize.h: No such file or directory
compilation terminated.
error: command 'gcc' failed with exit status 1
----------------------------------------
Cleaning up...
Command /usr/bin/python27 -c "import setuptools, tokenize;__file__='/tmp/pip_build_root/lxml/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-_eECL7-record/install-record.txt --single-version-externally-managed --compile failed with error code 1 in /tmp/pip_build_root/lxml
Storing debug log for failure in /root/.pip/pip.log
最佳答案
看起来它没有找到您的平台特定的包含文件。即位/wordsize.h
检查您是否有以下目录:
/usr/include/x86_64-linux-gnu/bits
如果存在,请尝试以下操作
cd /usr/include
ln -s /usr/include/x86_64-linux-gnu/* .
如果文件不存在,请尝试:
sudo apt-get install libc6-dev
如果您使用的是 CentOS 或 Redhat
yum install glibc-devel glibc-headers
关于python - 在 ec2 上安装 lxml 时出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21564316/
尽管我的 EC2 实例(带有针对 ECS 优化的 AIM)正在运行 ecs 代理,但容器并未在我的 EC2 中启动。为了确认 ecs-agent 正在我的 EC2 实例上运行,我检查了: ecs 日志
我想在一个任务定义中使用客户端和服务器在 aws ecs 中运行套接字程序。当我使用 awsvpc 网络模式并每次连接到本地主机上的服务器时,我都可以运行它。这很好,所以我不需要知道服务器的 IP 地
我有一个在 AWS ECS 上运行的 Docker 容器。我不想要负载均衡器,因为容器是用来处理 websocket 连接的。 https://aws.amazon.com/getting-start
我想在我的 AWS ECS/Fargate 集群上的公共(public) Docker 镜像中启动交互式 shell,以便从集群内部运行网络/连接测试。 似乎官方的方法是使用 aws ecs run-
我在 ECS Fargate 上托管了一个 Shiny 的应用程序。它运行得相当好,但偶尔在使用该应用程序时它会崩溃。我在事件选项卡中将其追溯到以下内容: service YYYY has start
在 AWS ECS 中创建容量提供程序时。我们正在填充的值 Target capacity %,在超过这个值后我们的集群缩小,但我很好奇当前集群的这个值是如何计算的,如果我想检查当前的是什么集群的值(
在 AWS ECS 中创建容量提供程序时。我们正在填充的值 Target capacity %,在超过这个值后我们的集群缩小,但我很好奇当前集群的这个值是如何计算的,如果我想检查当前的是什么集群的值(
我在 AWS 上设置了具有多个目标组和应用程序负载均衡器的 Fargate ecs 服务。它按预期运行。 然后我尝试使用本教程设置管道 https://docs.aws.amazon.com/Amaz
我有一个运行任务的 ECS 集群服务,可以使用 AWS 控制台查看其 Cloudwatch 日志流。 如何为 awslogs-stream-prefix 设置日期,因为我想按日期识别日志流。 "c
我正在使用两个容器部署 ECS Fargate 任务:1 个反向代理 nginx 和 1 个 python 服务器。对于每个我有一个 ECR 存储库,我有一个 CI/CD CodePipeline 设
我在 AWS ECS 上部署了一个 CloudFormation 堆栈,比如 teststack , 通过命令 aws cloudformation deploy --template-file ./
我这里有一些具体的用例。我需要自动扩展在 ECS Fargate 上运行的分布式 Web 应用程序。问题是所有节点都需要在内存中保留相同的数据(因此增加节点数量无助于内存压力)。因此,只有在水平(添加
我正在寻找有关为 ECS 任务分配内存的指南。我正在为希望在服务器成本上尽可能便宜的客户运行 Rails 应用程序。我正在查看具有 2 个 CPU 和 4 GB 内存的中等服务器大小。 大多数情况下,
我是 ECS 新手,我正在尝试使用 Cloudformation 部署它。 我通过查看文档以及从博客和一些文章中找到的一些示例来制作以下 cloudformation 模板。 但是,由于某种原因,它在
也许这很愚蠢,但如果我创建一个 ECS 任务定义(例如参见 https://aws.amazon.com/blogs/compute/better-together-amazon-ecs-and-aw
ECS 的容器定义允许您指定 memoryReservation对于每个容器: The soft limit (in MiB) of memory to reserve for the contain
我在 ca-central 区域创建了一个 AWS ECS 实例。它与每次更新服务时都会更改的动态公共(public) ip 一起使用。到目前为止一切都很好。 由于需要一个公网静态IP,所以我在同一区
Invalid 'containerPort' setting for container 'prerenderContainer'.(Service: AmazonECS; Status Code:
如果我在 ECS 服务级别进行自动扩展,我看不到使用容量提供程序扩展 ECS 集群的意义: https://docs.aws.amazon.com/AmazonECS/latest/developer
关闭。这个问题不符合 Stack Overflow guidelines 。它目前不接受答案。 想改进这个问题?更新问题,使其成为 Stack Overflow 的 on-topic。 1年前关闭。
我是一名优秀的程序员,十分优秀!