![在构建 RPM 包之前自动安装构建依赖项](https://linux22.com/image/26977/%E5%9C%A8%E6%9E%84%E5%BB%BA%20RPM%20%E5%8C%85%E4%B9%8B%E5%89%8D%E8%87%AA%E5%8A%A8%E5%AE%89%E8%A3%85%E6%9E%84%E5%BB%BA%E4%BE%9D%E8%B5%96%E9%A1%B9.png)
我正在尝试构建 .rpm 包。我刚刚按照步骤执行此操作。到目前为止,所有步骤都进展顺利,但现在我只是坚持这一步。我刚刚运行以下命令并收到此错误:
rpmbuild -ba asterisk.spec
error: Failed build dependencies:
gtk2-devel is needed by asterisk-1.8.12.2-1.fc15.x86_64
libsrtp-devel is needed by asterisk-1.8.12.2-1.fc15.x86_64
gmime22-devel is needed by asterisk-1.8.12.2-1.fc15.x86_64
graphviz is needed by asterisk-1.8.12.2-1.fc15.x86_64
graphviz-gd is needed by asterisk-1.8.12.2-1.fc15.x86_64
latex2html is needed by asterisk-1.8.12.2-1.fc15.x86_64
neon-devel is needed by asterisk-1.8.12.2-1.fc15.x86_64
libical-devel is needed by asterisk-1.8.12.2-1.fc15.x86_64
speex-devel >= 1.2 is needed by asterisk-1.8.12.2-1.fc15.x86_64
gsm-devel is needed by asterisk-1.8.12.2-1.fc15.x86_64
libedit-devel is needed by asterisk-1.8.12.2-1.fc15.x86_64
openais-devel is needed by asterisk-1.8.12.2-1.fc15.x86_64
alsa-lib-devel is needed by asterisk-1.8.12.2-1.fc15.x86_64
dahdi-tools-devel >= 2.0.0 is needed by asterisk-1.8.12.2-1.fc15.x86_64
dahdi-tools-libs >= 2.0.0 is needed by asterisk-1.8.12.2-1.fc15.x86_64
libpri-devel >= 1.4.12 is needed by asterisk-1.8.12.2-1.fc15.x86_64
libss7-devel >= 1.0.1 is needed by asterisk-1.8.12.2-1.fc15.x86_64
spandsp-devel >= 0.0.5-0.1.pre4 is needed by asterisk-1.8.12.2-1.fc15.x86_64
iksemel-devel is needed by asterisk-1.8.12.2-1.fc15.x86_64
jack-audio-connection-kit-devel is needed by asterisk-1.8.12.2-1.fc15.x86_64
libresample-devel is needed by asterisk-1.8.12.2-1.fc15.x86_64
lua-devel is needed by asterisk-1.8.12.2-1.fc15.x86_64
mISDN-devel is needed by asterisk-1.8.12.2-1.fc15.x86_64
bluez-libs-devel is needed by asterisk-1.8.12.2-1.fc15.x86_64
libtool-ltdl-devel is needed by asterisk-1.8.12.2-1.fc15.x86_64
unixODBC-devel is needed by asterisk-1.8.12.2-1.fc15.x86_64
portaudio-devel >= 19 is needed by asterisk-1.8.12.2-1.fc15.x86_64
postgresql-devel is needed by asterisk-1.8.12.2-1.fc15.x86_64
radiusclient-ng-devel is needed by asterisk-1.8.12.2-1.fc15.x86_64
net-snmp-devel is needed by asterisk-1.8.12.2-1.fc15.x86_64
lm_sensors-devel is needed by asterisk-1.8.12.2-1.fc15.x86_64
freetds-devel is needed by asterisk-1.8.12.2-1.fc15.x86_64
uw-imap-devel is needed by asterisk-1.8.12.2-1.fc15.x86_64
我正在使用 fedora-15。如何解决这个错误?任何想法和建议将不胜感激
谢谢
答案1
只需安装这些开发包,
yum -y install alsa-lib-devel bluez-libs-devel dahdi-tools-devel dahdi-tools-libs freetds-devel gmime22-devel graphviz graphviz-gd gsm-devel gtk2-devel iksemel-devel jack-audio-connection-kit-devel latex2html libedit-devel libical-devel libpri-devel libresample-devel libsrtp-devel libss7-devel libtool-ltdl-devel lm_sensors-devel lua-devel mISDN-devel neon-devel net-snmp-devel openais-devel portaudio-devel postgresql-devel radiusclient-ng-devel spandsp-devel speex-devel unixODBC-devel uw-imap-devel
如果此包属于标准存储库,请改用yum-builddep XXX
。 (需要yum-utils
先安装)