Building with rpmbuild under Ubuntu

夙愿已清 提交于 2019-12-11 01:26:49

问题


I need to build yum with a patch under Ubuntu 10.4 (reason being that i need a yum with chroot support for my vserver instance)

Since yum src for ubuntu where not avaliable (3rd party repos) i downloaded the source off the official repos and the patch off the linux-vserver.

However, when i try to build it with

rpmbuild -ba yum.spec 

It fails with

error: Failed build dependencies:
    python is needed by yum-3.2.22-0.src
    gettext is needed by yum-3.2.22-0.src
    intltool is needed by yum-3.2.22-0.src

Now i have all of these installed and i have no idea how to resolve this since i don't go rebuilding my stuff everyday.

Regards, V.


回答1:


The problem is that rpmbuild is trying to resolve the dependencies using RPM's own database of installed packages - which is not the same thing as apt-get's database. apt-get knows those things are installed, but rpm doesn't.

Since you're sure you have these things installed, I'd suggest editing yum.spec and removing them from the BuildRequires line.




回答2:


The solution is to enter the right deb-src repos to your yum list, download the source with apt-get source yum and apply the patch. Finally build the package with dpkg-buildpackage.



来源:https://stackoverflow.com/questions/5267735/building-with-rpmbuild-under-ubuntu

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!