Tuesday, December 28, 2010

How to install src.rpm packages in RHEL 6 ?

How to install *.src.rpm packages in RHEL 6 ?

Here i am installing "libpciaccess-0.12.1.fc14.src.rpm"

1. Copied libpciaccess-0.12.1.fc14.src.rpm on "/root/Desktop" location.

2. open console and go to "/root/Desktop".

3. Now give command,

#rpmbuild --rebuild libpciaccess-0.12.1.fc14.src.rpm

Here at the time i executed the above command it gave me a dependancy error to compile "libpciaccess-0.12.1.fc14.src.rpm" package, asked me for new version of "xorg-x11-util-macros" package, then i installed "xorg-x11-util-macros-1.3.0-1.fc12.noarch.rpm".

Now again i executed the same command,

#rpmbuild --rebuild libpciaccess-0.12.1.fc14.src.rpm

this time it executed properly without any error.

Keep in mind ; if its asking for any dependancy, you must resolve it, else you can't go for next step.

4. Next, if you check in "/root" folder you will find a new folder named "rpmbuild" with sub-folder's,


Here again in "RPMS" folder rou will find;

|- noarch
|- x86_64 (As i am using RHEL 6 - 64Bit)
      |- libpciaccess-0.12.0-1.el6.x86_64.rpm
      |- libpciaccess-debuginfo-0.12.0-1.el6.x86_64.rpm
      |- libpciaccess-devel-0.12.0-1.el6.x86_64.rpm

These above rpms are compiled from the "libpciaccess-devel-0.12.0-1.el6.x86_64.rpm" source package as per your system architecture.

Now go to,"/root/rpmbuild/RPMS/x86_64"

And install all three available rpms,

#rpm -ivh *.rpm

This command will install all the three available rpm's in that folder.

And now if you want to check the latest package verion provide, "#rpm -qa libpciaccess*" command

Package Installed ...

Cheer's ...

1 comment: