且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

Python bdist_rpm -ba:未知选项错误:命令“rpm"失败,退出状态为 1

更新时间:2022-06-15 08:42:58

只需运行:

yum install rpm-build

看来,如果 rpmbuild 命令不可用,setuptools 会回退到使用rpm"命令,它(据我所知)很久以前就内置了 rpmbuild 功能,但此后已被分离.因此,安装 rpm-build 包会使 rpmbuild 命令可用,并且 setuptools 在构建包时会使用它.

It appears that if the rpmbuild command is not available, setuptools falls back to usig the "rpm" command, which (as I understand it) had the rpmbuild functionality built in long, long ago but has since beeen separated. So, installing the rpm-build package makes the rpmbuild command available and setuptools uses it when it is building your package.