Solution to error: Failed dependencies during rpm package installation

Source: Internet
Author: User

When installing the rpm package in linux, you will often encounter the following problems:
Error: Failed dependencies:
........................................ .............
The ellipsis indicates that the package missing from this rpm is installed.
When this problem occurs, you can add two parameters after installing the rpm package command, for example:
Rpm-ivh libstdc ++ 5.0-3.3.3-62745cl. i386.rpm
Changed:
Rpm-ivh libstdc ++ 5.0-3.3.3-62745cl. i386.rpm -- nodeps -- force

The significance of the two parameters is,
During installation, the dependency between packages is not analyzed and directly installed,
No more error: Failed dependencies:

In RedHat Linux, Mandrake, and other release versions compatible with RedHat, the entire release version is installed using RPM. So the best way to install new software

The rpm package is downloaded from the network.
1) run the following command to install the software package with RPM:

# Rpm-ivh foo-1.0-l.i386.rpm (the software package here is the foo-1.0-l.i386.rpm, the following are all)

Foo ####################

The following rpm will output the name of the package and display a status bar. Installation is simple.

2) Remove installed software packages
To uninstall the software package foo, enter the following command:

# Rpm-e foo

Note: The package name is foo, not the rpm file name "foo-1.0-l.i386.rpm ".

3) Upgrade the Software Package
Upgrading software is similar to installing software:

# Rpm-Uvh foo-2.0-l.i386.rpm

Foo ####################

Note that rpm automatically installs the old version of the corresponding software package. If the configuration file of the old software version is incompatible with the new version, rpm automatically saves it as another file, and the user will see the following information:

Saving/etc/foo. conf as/etc/foo. conf. rpmsave

In this way, you can manually change the corresponding configuration file.
In addition, if you want to install the old version of the software, you will see the following error message:

# Rpm-Uvh foo-1.0-l.i386.rpm

Foopackag foo-2.0-l (which is newer) is already installed

Error: foo-1.0-l.i386.rpm cannot be installed

Use the-oldpackage parameter if you want to install it.

4) query the Software Package
You can use rpm-q to query the corresponding software in the rpm database. rpm will give the software package name, version, and release version number, for example:

# Rpm-q foo

Foo-2.0-l

The following are specific parameters that can be used for query:
-A: Query all software packages installed by the system.
-F. The file name query contains the package of the GA file.
-F is the same as the-f parameter, but the input is a standard input (for example, find/usr/bin | rpm-qF)
-Q: The software package name.
-Q is the same as-p parameter, but the input is standard (for example, find/mnt/cdrom/RedHat/RPMS | rpm-qQ)
The output format is as follows:
-I: displays the software package name, description, release, size, compilation date, installation date, and developer information.
-L display the files contained in the Software Package
-S: displays the current status of the file contained in the package. There are only two statuses: normal and missing.
-D: displays the documents in the software package (such as man, info, and README)
-C: displays the configuration files in the software package. These files must be manually modified after installation, such as sendmail. cf, passwd, and inittab.
If the-v parameter is used, the output similar to ls-l can be obtained.

5) Verify the software package with rpm
You can use rpm to verify installed software packages. rpm can verify file size, MD5 verification code, File Permission, type, owner, and other information.
The following describes the parameters during verification:
-A: Check whether the file in the software package exists.
-B. Verify a single file in the software package.
-C. Verify all installed software packages
-D: compare a source package with an installed package.

If the verification is successful, there will be no error information. If there is an error message, the format is as follows: the error message is an 8-Bit String, if it is ". ", it means there is no problem. The meaning of the corresponding characters is as follows:
5 MD5 verification error
S file size error
L symbolic connection
T file modification time error
D. The device file is incorrect.
U username Error
G group name Error
M attribute (including rewrite permission and file type) Error
If the user sees this information, it is best to reinstall or manually fix it.

++ ++
++ ++

Rpm practical skills!
1) you can install the software package through FTP. If you can connect to the network and want to install a new software package, you can directly use its URL to install it:
For example:

# Rpm-I ftp.linuxsir.com/pub/linux/redhat/RPMS/foo-1.0-1.i386.rpm

For installation, you can also query!

2) If you accidentally upload a few files in Wushan, but are not sure about the files, you can check the entire system to find out which parts may be damaged:

# Rpm-Va

3) if the user encounters a file that does not come out and wants to know which package it belongs to, he can do the following:

# Rpm-qf/usr/X11R6/bin/xjewel

The following information is displayed:
Xjewel-1.6-1

4) if you get a new RPM file but do not know its content, or want to know which files will be installed in the system in a file package, you can do this:

# Rpm-qpi koules-1.2-2.i386.rpm



Author IThead

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.