Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to install fpm Packaging tool under centos 6.5

2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/03 Report--

Xiaobian to share with you how to install fpm packaging tool under centos 6.5, I hope you have gained something after reading this article, let's discuss it together!

The FPM function is simply to convert one type of package into another.

FPM github: github.com/jordansissel/fpm

1. Supported source type packages:

dir: Package directories into desired types that can be used for source compilation and installation of packages

rpm: convert rpm

gem: convert rubygem packages

python: package Python modules into corresponding types

2. Install ruby environment and gem command: here I will package the development in advance

fpm is written by ruby, so the system environment needs ruby, and the version must be greater than 1.8.5

yum -y install ruby rubygems ruby-devel

[root@ Game Test ~]# rpm -qa| grep rubyruby-1.8.7.374-4.el6_6.x86_64ruby-rdoc-1.8.7.374-4.el6_6.x86_64ruby-devel-1.8.7.374-4.el6_6.x86_64ruby-libs-1.8.7.374-4.el6_6.x86_64ruby-irb-1.8.7.374-4.el6_6.x86_64rubygems-1.3.7-5.el6.noarch

3. View current ruby sources:

[root@ GAME TEST ~]#*** CURRENT SOURCES **http://rubygems.org/

Add domestic sources:

[root# gem sources -a http://mirrors.aliyun.com/rubygems/

Remove foreign sources:

[root#gem sources --remove http://rubygems.org/

4. To install FPM tools:

[root#gem install fpm

the error encountered

[root#gem install fpmBuilding native extensions. This could take a while... Building native extensions. This could take a while... ERROR: Error installing fpm:ruby-xz requires Ruby version >= 1.9.3.

solution

1. I tried this method by updating Ruby. Because Ruby's update pit is bigger. 2. Install older versions of fpm[root@ game test ~]# gem install fpm -v 1.4.0Successfully installed clamp-0.6.5Successfully installed fpm-1.4.02 gems installedInstalling ri documentation for clamp-0.6.5... Installing ri documentation for fpm-1.4.0... Installing RDoc documentation for clamp-0.6.5... Installing RDoc documentation for fpm-1.4.0... [root@ Game Test ~]# gem -v1.3.7

5.FPM common parameters:

-s: Specify the source type-t: Specify the target type, i.e. why you want to make the package-n: Specify the package name-v: Specify the version number of the package-C: Specify the relative path of the package-d: Specify which packages depend on-f: Overwrite the installation package with the same name if it exists in the directory of the second package-p: Specify the directory of the output installation package, if you do not want to put it in the current directory-post-install: Script to run after the package installation is completed; same as--offer-install--pre-install: Script to run before the package installation is completed; same as--before-install--post-uninstall: Script to run after the package uninstall is completed; same as--offer-remove--pre-uninstall: Script to run before the package uninstall is completed; After reading this article, I believe you have a certain understanding of "how to install fpm packaging tools under centos 6.5." If you want to know more about related knowledge, welcome to pay attention to the industry information channel. Thank you for reading!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development