XX.src.rpm package installation method

Sometimes, when we are looking for source packages, we find packages with src.rpm instead of tar.gz/tgz/zip.

Here we take the name my-package.src.rpm as an example, and introduce the basic installation method of the src.rpm package under the x86_64 system platform of Centos7.4. The steps are as follows:

  1. Execute the rpm-i my-package.src.rpm command;
  2. Switch directory: cd /root/rpmbuild/SPECS (the path of Centos5.x and previous versions is /usr/src/redhat/SPECS, and the path of Centos6.x and later versions becomes /root/rpmbuild/SPECS);
  3. Execute the rpmbuild operation: rpmbuild -bb my-package.specs (my-package.specs is a specs file with the same name as the package). At this point, in the /root/rpmbuild/RPMS/x86_64 directory, there are one or more generated rpm packages, which are compiled executable rpm files;
  4. Execute the installation command: rpm -ivh new-package.rpm;

Compile and install ganglia: 

Release the rpm file:

It prompts that the dependency build failed, and all dependent software packages need to be installed at this time. 

[root

Guess you like

Origin blog.csdn.net/qq_35029061/article/details/131996425