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.

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

#su
#cd
#mkdir rpm
#cd rpm
#mkdir BUILD RPMS SOURCES SPECS SRPMS
#cd

Now the next step is creating .rpmmacros file. And the commands are.
#cd
#cat < .rpmmacros
#%HOME %{expand:%%(cd; pwd)}
#%_topdir %{HOME}/rpm
#EOF
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


Working
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 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.

Ubuntu Linux Installation and Review

Ubuntu has been one of the best open source Linux OS over the years, in this article I tell you the features of the OS and the pros and cons of the OS.

Benefits of Windows over Linux

Often do people think that what is complex is what is better. So do people think when it comes to the thing called Linux and windows. This article discusses about the aspects in which Windows operating system is better than Linux.

What is Linux and should you switch to use Linux rather?

In this article you won't be told about all the technical details of Linux, but it is simply an overview of it. Before you actually start learning how to use it, you must have all the background knowledge about it. After reading this you will definitely be in a better position to decide whether to switch to Linux or not.

More articles: Linux Installation Linux Operating System

Comments

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:
    Email: