Replacing Dependency Files
If compatible dependency files (such as SO dynamic libraries) exist during source code porting, handle them as follows.
Procedure
- Obtain the software packages.
Obtain the corresponding software package (RPM/DEB) or source code based on the Handling Suggestions under Architecture-Related Dependencies.
Figure 1 Dependencies
- Click Download to obtain the software packages (RPM/DEB).
- Go to the community to download the source code.
- Obtain the dependency files.
- RPM package
- (Recommended) Method 1: Directly install the package to generate the dependency files.
rpm -ivh package.rpm
- Method 2: Extract the RPM package and find the dependency files.
rpm2cpio package.rpm | cpio -idmv
package indicates the name of the software package to be downloaded.
- (Recommended) Method 1: Directly install the package to generate the dependency files.
- DEB package
- (Recommended) Method 1: Directly install the package to generate the dependency files.
dpkg -i package.deb
- Method 2: Extract the DEB package and find the dependency files.
dpkg-deb -x package.deb ./extract_dir
- package indicates the name of the software package to be downloaded.
- extract_dir indicates the extracted directory.
- (Recommended) Method 1: Directly install the package to generate the dependency files.
- Source code: Go to the community to obtain the source code and install it based on the integrated guide to generate dependency files.
- RPM package
- Search for the paths to the dependency files to be replaced and replace them.
find / -name xxx
xxx indicates the names of the dependency files in Architecture-Related Dependencies.
- If a dependency file path is a system path (for example, /usr/lib or /usr/lib64):
- If an RPM package, a DEB package, or source code is installed in the previous step, you do not need to replace the dependencies.
- If an RPM or DEB package is extracted in the previous step, replace the dependency files in the found paths with the newly generated or extracted dependency files. Back up the source files before replacement.
- If a dependency file path is the source code package path, replace the dependency files with the newly generated or extracted dependency files.
- If a dependency file path is a system path (for example, /usr/lib or /usr/lib64):
Parent topic: References