RPM package uses a common problem

xiaoxiao2021-03-06  79

1. How to install the RPM package RMP package can be done using the program RPM. Perform the following command rpm -i your-package.rpm where your-package.rpm is the file name of the RPM package you want to install, generally placed in the current directory. The following warnings or prompts may appear during installation: ... conflict with ... It may be that some files to be installed may overwrite existing files, which cannot be installed correctly when it is default. Mandatory installation with rpm --force -i ... is needed by ... is not installed ... Some software required for this package You don't have installation You can use rpm --Nodeps -i to ignore this information That is, rpm -i --force - Nodeps can ignore all dependencies and file issues, what packages can be installed, but this forced installation package cannot guarantee full function 2. How to install .src.rpm Software packs Some packages are ended with .src.rpm, such packages are RPM packs that contain source code, and need to be compiled during installation. This type of software package has two installation methods. Method 1: 1. Execute rpm -i your-package.src.rpm 2. CD / usr / src / redhat / specs 3. rpmbuild -bp your-package.specs one and you Software package SPECS file 4. CD / usr / src / redhat / build / your-package / one directory with your packages 5. ./configure and compile normal source software, you can add Parameter 6. make 7. make install method 2: 1. Perform rpm -i you-package.src.rpm 2. CD / USR / SRC / RedHat / SPECS two steps and methods are the same 3. rpmbuild -bb your-package .SPECS A SPECS file with your package is at this time, in / usr / src / redhat / rpm / i386 / (depending on the specific package, it may be I686, noarch, etc.) in this directory, there is one New RPM package, this is a compiled binary. Perform rpm -i new-package.rpm can be installed. 3. How to uninstall the RPM package using the command RPM -E package name, the package name can contain the version number and other information, but can not have suffix.rpm, such as uninstall pack PROFTPD-1.2.8-1, you can use the following format: rpm - e proFTPD-1.2.8-1 rpm -e proFTPD-1.2.8 rpm -e proFTPD- rpm -e proFTPD can not be the following format: rpm -e proFTPD-1.2.8-1.i386.rpm rpm -e proFTPD- 1.2.8-1.i386 rpm -e proFTPD-1.2 rpm -e proFTPD-1 Sometimes some errors or warnings: ... is needed by ... This shows that this software is needed by other software, can not be unloaded casually RPM -E - Nodeps forced unloading 4. How to do not install but get files in RPM packages RPM2CPIO and CPIO RPM2CPIO XXX.RPM | CPIO -VI RPM2CPIO XXX.RPM | CPIO -IDMV RPM2CPIO XXX.RPM | CPIO --Extract - Make-Directories Parameters I and Extract are the same, indicating extracted files. v Represents the same execution process D and Make-Directory, indicating that the directory m represents the update time of the holding file according to the original path in the package.

5. How to view files related to RPM packages and other information All of the following examples are assumed to use the package mysql-3.23.54a-11 1. I have installed those RPM packages rpm -qa to explain all installed. If you want to find all installed packages RPM -QA | GREP SQL 2. How to get a package of files, you can get the MYSQL package installed in the system. Name, you can get information such as the current package of packages. In this example, you can get information mysql-3.23.54a-11 3. The file in an RPM package is installed there? RPM-QL Package Note This is the name of the package that does not include the .rpm suffix, that is, only mysql or mysql-3.23.54a-11 instead of Mysql-3.23.54a-11.rpm. If you just want to know that the executable is going there, you can use Which, such as Which MySQL 4. A RPM package contains those files that have not been installed, using rpm -qlp ****. Rpm Installed package, you can also use rpm -ql ****. RPM 5. How to get related information about a package, use, etc. A package that has not been installed, uses rpm -qip ****. RPM a package already installed, you can also use rpm -qi ****. Rpm 6. Which package is installed, Or which package contains this program RPM -QF `Which program name` Return to the full-name RPM -QIF `Which program name` Return to the package Related information RPM-QLF `Which program name` Return to the package of files Note Here is not quoted, but it is the key in the upper left corner of the keyboard. You can also use rpm -qilf, and output software package information and file list 7. Which package is installed, or which package contains this file, the method in the previous problem, only apply the executable program And the following method can not only be used in executable programs, but also for any files. The premise is to know this file name. First get the full path to this program, you can use whereis or which, then use rpm -qf, for example: # whereis ftptop ftptop: / usr / bin / ftptop /usr/share/man/man1/ftptop.1.gz # rpm -qf / usr / bin / ftptop proFTPD-1.2.8-1 # rpm -qf /usr/share/doc/proftpd-1.2.8/rfc/rfc0959.txt proFTPD-1.2.8-1 summary: Get package related information With rpm -q, q represent query query, then you can follow other options, such as INFO, information to obtain the package; L represents the list, obtain a list of files; A represents all, execute the query in all packets; F represents File, According to the relevant query; P Represents package, the query condition required to query the query required to use GREP, or generated from the command line in "` `" to generate 6. About some related knowledge about the RPM package 1. What is RPM rpm is REDHAT PACKAGEMENT, is one of the invention of Redhat. 2. Why is RPM that requires a software package that implements various functions under an operating system. These packages generally have their own procedures, but there is also an intricate dependency.

转载请注明原文地址:https://www.9cbs.com/read-108214.html

New Post(0)