How to install src rpm file in Redhat / Fedora linux

This article teach you about installing the SRC RPM file procedure. Here I have given the configuration needed and the commands used to install the source rpm file. Also here I have given the common errors and troubleshoot.

What is SRC file

SRC means it is a source file which contain source code. You may have doubt that does this support your computer. Don't worry SRC rpm is the latest version that can be installed to your PC that have Redhat or Fedora OS. The use of SRC file is that you can modify the source code and built your own program. In simple SRC file contains source code and normal rpm contains binary code. A programmer writes a source code and then they convert it into binary code. There is command in redhat OS to convert the source code to binary code.

For installing SRC RPM file you should create following directories in the home directory (~). Open the terminal and enter the following command.

#mkdir rpm
#cd rpm

Now the next step is creating .rpmmacros file. And the commands are.
#cat < .rpmmacros
#%HOME %{expand:%%(cd; pwd)}
#%_topdir %{HOME}/rpm
After this you can proceed to installing SRC RPM process.

Commands to install SRC RPM
Lets take a filename as "VLC.src.rpm". Then use the following command.

#rpm -ivv VLC.src.rpm. This command installs the src rpm file.

#cd rpm/SPECS. This command opens the SPECS directory.
#rpm -bp VLC.spec &> bp.log.
#rpm –bb –clean VLC.spec &> bb.log. This command builds the binary package. Then the built binary package will be found in following directory.
#cd ~/rpm/RPMS/i386
#rpm -ivh VLC.rpm. This is the binary package which you need to install in your PC. Then you need to remove the following file.
#cd ~/rpm/SPEC
#rm VLC.spec

You can install by simply giving the below command.
#rpm --rebuild VLC.src.rpm &> rebuild.log

Errors and troubleshoot

A) Error 1 - Configure: error: UCD SNMP header files found, but sprint_realloc_objid not found in SNMP library.
error: bad exist status from /var/tmp/rpm-tmp.47473(% build)
RPM build errors:
Bad exist status from /var/tmp/rpm-tmp.47473(% build)

Solution - This means your PC does not have required RPM library files. Make sure that you have installed all the dependencies needed for you RPM file.

B) Error 2 - --rebuild: unknown option. This error usually occurs in latest RHEL OS.

Solution – In this case use the command rpmbuild --rebuild VLC.src.rpm

The source package will be available in SOURCES directory. This source is used to deliver the RPM file in RPM directory. RPM directory hold the rpm's that you need to install. So the files in the RPMS directory is the binary file which you download normally. The SPECS file holds many information about RPM's such as unpacking, applying patches, building application, creating source and binary file.

Related Articles

How Fedora Linux is better than Windows OS?

Are you planning to shift to Linux operating system? Want to know about Fedora OS? Here are the features of Fedora OS that outperforms Windows. Read the article to get the pros and cons of Fedora OS.

How to backup files in Fedora OS using Deja-Dup in simple steps?

Are you wondering how to back up your files in Fedora OS? Are you looking for easy way to back up files? Here is the tutorial which helps you to back up file with several handy options for you. Here I have given screen by screen procedure to install back up software and using it.

How to disable Bluetooth in Fedora 19 at start up?

Does your Fedora 19 automatically starts Bluetooth in GNOME 3 shell? Are you messed up and want to disable Bluetooth at start up in Fedora 19? Read the below article and disable Bluetooth service at start up in Fedora 19.

How to watch Netflix in Fedora

Need to watch Netflix movies and TV shows in Fedora? Below I have given tutorial to install and watch Netflix movies in your computer running Fedora operating system. Read the below article to install Netflix in Fedora.

How to Create Bootable Ubuntu Linux USB Drive

Installing Ubuntu Linux on USB drive has many benefits. It can solve many administrative issues and protect the data or help recover it. How you wish to use this functionality is up-to you. In this article, we are going to discuss multiple ways to create a bootable Ubuntu USB drive.

More articles: Linux Installation Fedora OS Linux Operating System


Author: Ramchandra15 Feb 2015 Member Level: Gold   Points : 2

Thanks for sharing the detailed information about how to install the SRC RPM file in Redhat Linux operating system. This knowledge base article is really helpful for Linux users.

  • Do not include your name, "with regards" etc in the comment. Write detailed comment, relevant to the topic.
  • No HTML formatting and links to other web sites are allowed.
  • This is a strictly moderated site. Absolutely no spam allowed.
  • Name: