Detailed introduction to Linux software package dependency

Source: Internet
Author: User

Linux software package dependency makes many users in Linux very troublesome. During Linux installation, not all software packages are installed. After installing the software, you may encounter some dependency problems. For example, when installing some programming software packages, the system may prompt some errors. We need the support of some other software packages.

What should we do if we encounter such Linux software package dependency? Before talking about the specific solution, let me talk about the dependencies of software packages in which situations.

First, you did not select all software packages when installing the operating system. Most of the time, for security or other reasons, the Linux System Administrator usually does not choose to install all the software packages. Instead, install necessary software packages to run related services. However, sometimes the system administrator may not know which software packages must be installed. Otherwise, some subsequent services will not be started, and those software packages are optional. Since it is difficult to find out the content during system installation, this problem may occur when other software packages are deployed after the Linux system is installed.

Second, similar problems may occur when you append some other application services to a Linux server. If an enterprise needs to use an Oracle database, I will install the Oracle database on the original file server. However, installing the Oracle server on Linux is a headache and many software packages need to be installed. I did not know how to install the Oracle database when I first deployed the Linux file server, so many software packages were not installed. And later I found that many software packages are not in the Linux installation disk, so I need to go online. Therefore, if you want to append some application services to a previously deployed Linux server, the dependency of this software package may easily occur.

In fact, solving the dependency problem of this Linux software package is neither simple nor complex. I have summarized several methods below. You can learn from them if necessary.

1. Find the installation disc based on the error message.

When installing a software package, if you encounter software dependency problems, the system usually prompts related information. Such as the prompt "libgd. so.1.8 is needey by php-4.2.2-17" and so on. This indicates that the libgd. so software package must be installed before the PHP program is installed. When this problem occurs, we recommend that the system administrator check whether the software package exists from the installation disk of the Linux System Based on the prompt.

As shown in, a large number of software packages are stored in the RPMS directory of the Linux installation disk. Generally, common software packages such as libgd. so can be found in this CD. Therefore, the system administrator can learn the software package to be installed before installing the software based on the system error message. Find the software package from the system disk and install it. In addition, it should be noted that, for the RedHat operating system, if you use a CD to install the disk, it can have many CDs. These packages are often not stored on a CD. However, it is certain that the RPMS directory is available under each CD. If the system administrator does not know the disk in which a software package is stored, he or she can find it one by one. Although it is a little more troublesome, but in most cases there will be gains.

However, this method has a limit. Large applications such as Oracle installation are not very suitable. Because it takes time to install such a large software. If you wait until the installation fails and follow the prompts to install the software package, repeat the installation will waste a lot of time and cause the system to generate a lot of junk files. For this reason, unless it is a small software package, it is best to follow the method I will introduce below to save the software installation time.

2. Refer to the official documents.

In general, some software official documents will indicate which software packages are required to install their software. For example, you must install many software packages when installing the Oracle database. Which software packages need to be installed are described in detail on the official Oracle website. When installing the Oracle database, I first install this instruction to verify whether these software packages are installed in Linux. If it is not installed, install it immediately. At this time, the Linux system administrators should not be lucky. If you don't install it, it won't be a big problem. This is a big mistake. The software packages recommended on the official website of Oracle must be installed before the Oracle database system is installed. Otherwise, the installation of the database fails. Otherwise, the subsequent database may be unstable.

In fact, it is not just an Oracle database system, but some other application software will have similar requirements for the Linux system. They require that some software packages be installed on Linux systems before their application software is installed. Otherwise, the installation will fail. Therefore, I suggest you Linux system administrators to search for similar documents on the official website before installing these software, and then verify whether these software packages are installed on the Linux system against the document. In this way, the dependency between software packages can be avoided. In addition, you can find many useful values on the Internet. Some Linux system administrators who have installed the Software List the dependencies of software packages that the system has encountered during the installation process, and describe the software packages to be installed first. Documents on these networks may not be as professional as official documents. But it also has great reference value for us.

3. query through professional networks.

To correctly install some software packages, you need to install some files. However, sometimes the system administrator may not be able to determine which software packages to install based on the system prompts. This is especially true for software packages that are not commonly used or first exposed by the system administrator. At this time, the system administrator can go to some professional websites to query. Here I will introduce you to a very good website, that is, http://rpmfind.net. The system administrator only needs to enter the name of the file to be searched on this website, such as libgd. so. Then, the search result shows the software package to be installed to have the file. After finding the software package name, you only need to download the software package from the CD or the network for installation. Of course, when installing these software packages, you may encounter other software package dependencies. For example, the libgd. so file is required to install the php package, which belongs to the gb package. However, when installing the gb software package, it may be dependent on other software packages, and other software packages need to be installed. At this time, the system administrator needs to patiently solve the problem one by one.

In most cases, when the software package dependency problem occurs, the file name provided by the operating system is directly related to the software package name. It is possible that the file name is the package name. However, sometimes the file name is different from the package name. At this time, most system administrators may not be able to find the corresponding software package by file name. In this case, you need to use some of the professional websites mentioned above to query the software package name.

I also have a small suggestion. After a system administrator installs a software package, if there is a dependency between the software packages, it is best to take the book or record it by other means. This is because you may need to install the software in your future work. In this case, the next installation will not be so troublesome. You can install the required software package directly according to previous notes. After all, falling down in the same place is not a glorious thing.

These are the best practices for solving the dependency problem of Linux software packages. If the system administrator has mastered these tricks, most of the software package dependency problems will be solved.

  1. Linux init process and related files
  2. Detailed analysis of ten aspects of Linux Server Security Protection
  3. Share a simple Linux data backup solution
  4. Linux Regular Expression 1)
  5. Detailed analysis of ten aspects of Linux Server Security Protection

Related Article

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.