How to install RPM packages under Linux

Source: Internet
Author: User
Tags error handling rpmbuild

first, the production of RPM package


The process of making a rp-pppoe-3.10 column.

1. Download rp-pppoe-3.10.tar.gz

[Root@localhost home]# pwd

/home

[Root@localhost home]#

2. Decompression

# tar ZXVF rp-pppoe-3.10.tar.gz

3.

# cp/home/rp-pppoe-3.10/rp-pppoe.spec/usr/src/redhat/sources/

# cp/home/rp-pppoe-3.10.tar.gz/usr/src/redhat/sources/

3. Make RPM Package

# cd/usr/src/redhat/sources/

# RPMBUILD-BB Rp-pppoe.spec <== only compiled into RPM files

# Rpmbuild-ba Rp-pppoe.spec <== compiles and produces both RPM and srpm files

If the compilation is successful, you have already made the Rp-pppoe RPM package, look at

[Root@localhost i386]# pwd

/usr/src/redhat/rpms/i386

[Root@localhost i386]# LL

Total 420

-rw-r--r--1 root root 186322 01-06 11:09 rp-pppoe-3.10-1.i386.rpm

-rw-r--r--1 root root 150356 01-06 11:09 rp-pppoe-debuginfo-3.10-1.i386.rpm

-rw-r--r--1 root root 63319 01-06 11:09 rp-pppoe-gui-3.10-1.i386.rpm

[Root@localhost i386]#

Second, install the RPM package

1. View the system has five installed Rp-pppoe.

[Root@localhost i386]# Rpm-qa Rp-pppoe

Rp-pppoe-3.5-1

2. Remove the system has been installed RPM package

[Root@localhost i386]# rpm-e Rp-pppoe

[Root@localhost i386]# Rpm-qa Rp-pppoe

3. Install the RPM package just made

[Root@localhost i386]# ls

rp-pppoe-3.10-1.i386.rpm rp-pppoe-gui-3.10-1.i386.rpm

rp-pppoe-debuginfo-3.10-1.i386.rpm

[Root@localhost i386]# RPM-IVH rp-pppoe-3.10-1.i386.rpm

Preparing ... ########################################### [100%]

1:rp-pppoe ########################################### [100%]

[Root@localhost i386]# Rpm-qa Rp-pppoe

Rp-pppoe-3.10-1

[Root@localhost i386]# Ls/etc/ppp/pppoe-server-options

/etc/ppp/pppoe-server-options

The above information shows that the installation was successful OH.

Third, error handling

The error occurred while making the RPM (1.3 steps):

RPM Build Errors:

Installed (but unpackaged) file (s) found:

Solution:

will be in/usr/lib/rpm/macros

%__check_files/usr/lib/rpm/check-files%{buildroot} comment out

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.