当前位置: 技术问答>linux和unix
如何自动解决rpmbuild编译时出现的依赖问题?
来源: 互联网 发布时间:2016-09-14
本文导语: 下载了一个MPLAY.src.rpm源码包,编译时有太多的依赖性问题 [ahui@ahui-host ~]$ ls ~/rpmbuild/SOURCES/ mplayer-export-2010-04-24.tar.bz2 mplayer-snapshot.sh mplayer-x264.patch [ahui@ahui-host ~]$ ls ~/rpmbuild/SPECS/ mplayer.spec #编译脚本 [ahui@ahui-...
下载了一个MPLAY.src.rpm源码包,编译时有太多的依赖性问题
问题:由于依赖文件太多,挨个把这些文件下载很费时间,请问怎么让它自动解决依赖问题?
注:安装本地RPM文件时,可以通过YUM自动解决依赖:yum localinstall *.rpm -nogpgcheck.
但是这个是src.rpm源码包,可否利用yum来解决依赖性?我觉得可以通过shell脚本来自动解决依赖性,可是脚本我根本不会。谁能给点提示。
有没有其它的好点的方法呢?
[ahui@ahui-host ~]$ ls ~/rpmbuild/SOURCES/
mplayer-export-2010-04-24.tar.bz2 mplayer-snapshot.sh
mplayer-x264.patch
[ahui@ahui-host ~]$ ls ~/rpmbuild/SPECS/
mplayer.spec #编译脚本
[ahui@ahui-host ~]$ cd ~/rpmbuild/SPECS/
[ahui@ahui-host SPECS]$ rpmbuild -ba mplayer.spec #编译
error: Failed build dependencies:#出现一大堆依赖性问题
SDL-devel is needed by mplayer-1.0-0.116.20100424svn.fc13.i386
a52dec-devel is needed by mplayer-1.0-0.116.20100424svn.fc13.i386
aalib-devel is needed by mplayer-1.0-0.116.20100424svn.fc13.i386
alsa-lib-devel is needed by mplayer-1.0-0.116.20100424svn.fc13.i386
cdparanoia-devel is needed by mplayer-1.0-0.116.20100424svn.fc13.i386
em8300-devel is needed by mplayer-1.0-0.116.20100424svn.fc13.i386
enca-devel is needed by mplayer-1.0-0.116.20100424svn.fc13.i386
faad2-devel >= 1:2.6.1 is needed by mplayer-1.0-0.116.20100424svn.fc13.i386
fontconfig-devel is needed by mplayer-1.0-0.116.20100424svn.fc13.i386
freetype-devel >= 2.0.9 is needed by mplayer-1.0-0.116.20100424svn.fc13.i386
fribidi-devel is needed by mplayer-1.0-0.116.20100424svn.fc13.i386
giflib-devel is needed by mplayer-1.0-0.116.20100424svn.fc13.i386
gtk2-devel is needed by mplayer-1.0-0.116.20100424svn.fc13.i386
ladspa-devel is needed by mplayer-1.0-0.116.20100424svn.fc13.i386
lame-devel is needed by mplayer-1.0-0.116.20100424svn.fc13.i386
libGL-devel is needed by mplayer-1.0-0.116.20100424svn.fc13.i386
libXinerama-devel is needed by mplayer-1.0-0.116.20100424svn.fc13.i386
libXScrnSaver-devel is needed by mplayer-1.0-0.116.20100424svn.fc13.i386
libXv-devel is needed by mplayer-1.0-0.116.20100424svn.fc13.i386
libXvMC-devel is needed by mplayer-1.0-0.116.20100424svn.fc13.i386
libXxf86dga-devel is needed by mplayer-1.0-0.116.20100424svn.fc13.i386
libXxf86vm-devel is needed by mplayer-1.0-0.116.20100424svn.fc13.i386
libcaca-devel is needed by mplayer-1.0-0.116.20100424svn.fc13.i386
libdca-devel is needed by mplayer-1.0-0.116.20100424svn.fc13.i386
libdv-devel is needed by mplayer-1.0-0.116.20100424svn.fc13.i386
libdvdnav-devel >= 4.1.3-1 is needed by mplayer-1.0-0.116.20100424svn.fc13.i386
libjpeg-devel is needed by mplayer-1.0-0.116.20100424svn.fc13.i386
libmpcdec-devel is needed by mplayer-1.0-0.116.20100424svn.fc13.i386
libtheora-devel is needed by mplayer-1.0-0.116.20100424svn.fc13.i386
libvdpau-devel is needed by mplayer-1.0-0.116.20100424svn.fc13.i386
libvorbis-devel is needed by mplayer-1.0-0.116.20100424svn.fc13.i386
lirc-devel is needed by mplayer-1.0-0.116.20100424svn.fc13.i386
live555-devel is needed by mplayer-1.0-0.116.20100424svn.fc13.i386
lzo-devel >= 2 is needed by mplayer-1.0-0.116.20100424svn.fc13.i386
pulseaudio-lib-devel is needed by mplayer-1.0-0.116.20100424svn.fc13.i386
schroedinger-devel is needed by mplayer-1.0-0.116.20100424svn.fc13.i386
speex-devel >= 1.1 is needed by mplayer-1.0-0.116.20100424svn.fc13.i386
twolame-devel is needed by mplayer-1.0-0.116.20100424svn.fc13.i386
x264-devel >= 0.0.0-0.27 is needed by mplayer-1.0-0.116.20100424svn.fc13.i386
xvidcore-devel >= 0.9.2 is needed by mplayer-1.0-0.116.20100424svn.fc13.i386
yasm is needed by mplayer-1.0-0.116.20100424svn.fc13.i386
opencore-amr-devel is needed by mplayer-1.0-0.116.20100424svn.fc13.i386
docbook-style-xsl is needed by mplayer-1.0-0.116.20100424svn.fc13.i386
问题:由于依赖文件太多,挨个把这些文件下载很费时间,请问怎么让它自动解决依赖问题?
注:安装本地RPM文件时,可以通过YUM自动解决依赖:yum localinstall *.rpm -nogpgcheck.
但是这个是src.rpm源码包,可否利用yum来解决依赖性?我觉得可以通过shell脚本来自动解决依赖性,可是脚本我根本不会。谁能给点提示。
有没有其它的好点的方法呢?
|
先看看这个源码包是否适用于你的linux系统,缺这么多包,通常是和系统不匹配,如果你坚持要安装,最好安装一个全面点的系统,包括了所有的lib。否则就一个个下载rpm包吧
|
把spec里的BuildRequires:去掉!
|
呵呵,是yum解决依赖啊,,看错了~~~~
Build dependencies are already part of a src.rpm header, just not tag
#1109. You can
query build dependencies from a src.rpm package just like you can query
for dependencies
from a binary rpm.
Build dependencies are already part of a src.rpm header, just not tag
#1109. You can
query build dependencies from a src.rpm package just like you can query
for dependencies
from a binary rpm.
|
以前,我在1G内存的windows操作系统的虚拟机中装了一个linux,开的内存是512m,然后我在linux中编译gcc的源码,花了我三天三夜。。。。好慢。。。耐心!