【问题标题】:I want to create rpm for Python-2.7.15 pkg on centos 7.5我想在 centos 7.5 上为 Python-2.7.15 pkg 创建 rpm
【发布时间】:2018-11-29 16:49:56
【问题描述】:

在 centos 7.5 上为 Python-2.7.15 创建 rpm 时。 我正在使用以下命令创建 rpm。

python setup.py bdist_rpm
.....
......
.....
Executing(%build): /bin/sh -e /var/tmp/rpm-tmp.UFJQ7P
+ umask 022
+ cd /root/rpmbuild/SOURCES/Python-2.7.15/build/bdist.linux-x86_64/rpm/BUILD
+ cd Python-2.7.5
+ env 'CFLAGS=-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches   -m64 -mtune=generic' python setup.py build
running build
running build_ext
error: pyconfig.h: No such file or directory
error: Bad exit status from /var/tmp/rpm-tmp.UFJQ7P (%build)

RPM build errors:
    Bad exit status from /var/tmp/rpm-tmp.UFJQ7P (%build)
error: command 'rpmbuild' failed with exit status 1

【问题讨论】:

  • 你考虑过用谷歌搜索error: pyconfig.h: No such file or directory 吗?第一个链接有你的答案...

标签: python linux centos7


【解决方案1】:

pyconfig.h 是 CentOS 上的 python-devel 软件包的一部分。安装它

sudo yum install python-devel

对于基于 debian 的发行版使用

sudo apt-get install python-dev

【讨论】:

  • 嗨,我已经安装了 python-devel-2.7.5-68.el7.x86_64.rpm 使用命令 'yum install python-devel-2.7.5-68.el7.x86_64.rpm' 之后也安装 python-devel,我面临同样的问题。我正在尝试使用以下命令构建 rpm # /usr/local/bin/python2.7 setup.py bdist_rpm
猜你喜欢
  • 1970-01-01
  • 2016-08-18
  • 2017-12-29
  • 2011-01-20
  • 2013-07-30
  • 1970-01-01
  • 2018-06-04
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多