当前位置:网站首页>fpm工具安装
fpm工具安装
2022-06-28 06:20:00 【求真得真】

概述
最近在对机房的编译环境做整理,过程曲折而痛苦,记录一下。
之前的一个老项目,在打包的时候用到了一个叫做fpm的工具。
编译环境涉及centos6和centos7,在新的编译环境的过程中,如何安装好fpm。
环境
centos6
centos7
安装过程的俄罗斯套娃
我们尝试在一个新的服务器上部署编译打包环境。
部署打包环境,打包脚本中用到了fpm(1)工具。
安装fpm工具,网上搜了一下,centos上安装fpm打包工具的流程, 大都是通过yum安装“ruby(2) rubygems ruby-devel”,再通过gem(3)安装fpm。
但是,在使用gem安装fpm的过程中,要求ruby版本大于2.4(yum安装的ruby-1.8.7)。
好吧,升级ruby,网上又让我们安装rvm(4)来管理升级ruby版本。。。
继续,rvm官网说这个很容易(Cut Rubies with ease!),然后第一条“gpg2”命令各种报错。。。
gpgkeys: HTTP fetch error 6: Couldn't resolve host 'keys.gnupg.net'
gpg这个错误搜了半天也没见什么靠谱的解决办法,完全的认知盲区。
休息一会,整理思路。
回到ruby本身的问题,在ruby的官网下载了源码安装。
可用的安装步骤
fpm打包过程中会用到rpmbuild工具,需要yum安装rpmdevtools。
sudo yum install rpmdevtools
删除yum源安装的老版本ruby。
sudo yum remove ruby ruby-devel rubygems
从ruby官网下载ruby-2.5.9版本的源代码包。
wget https://cache.ruby-lang.org/pub/ruby/2.5/ruby-2.5.9.tar.gz
编译安装。
tar -zxvf ruby-2.5.9.tar.gz
cd ruby-2.5.9
./configure
make
sudo make install
建立软连接,否则sudo的时候会找不到gem命令,或者找到的gem版本不对。
sudo ln -s /usr/local/bin/gem /usr/bin/gem
ruby -v
gem -v
使用gem安装fpm,指定版本1.9.3是因为老的编译环境保持一致。
sudo gem install fpm -v 1.9.3
sudo ln -s /usr/local/bin/fpm /usr/bin/fpm
fpm -v
总结
网上各种文档和解决方案并不完善,即便当时看起来是完善的,也会随着时间的推移慢慢变得无法使用。
这是一件所有技术人都会头秃的事情。
ruby的源代码编译安装还比较简单顺利。
ruby2.5.9版本也已经过了维护期。
空空如常
求真得真
边栏推荐
- CAD二次开发+NetTopologySuite+PGIS 引用多版本DLL问题
- Linked list (I) - remove linked list elements
- PKG package node project (express)
- AutoCAD C polyline self intersection detection
- Yygh-6-wechat login
- Create a gson object that formats the time zone. JSON parsing time formatting zoneddatetime
- JQ picture amplifier
- At first glance, I can see several methods used by motionlayout
- Configure multiple database connections using the SSM framework
- Apple MDM bypass jailfree bypass MDM configuration lock free
猜你喜欢

CAD secondary development +nettopologysuite+pgis reference multi version DLL

浮动与定位

lombok @EqualsAndHashCode 注解如何让对象.equals()方法只比较部分属性

Error reporting - resolve core JS / modules / es error. cause. JS error

YYGH-BUG-03

职场IT老鸟的几点小习惯

death_ satan/hyperf-validate

AutoCAD C# 多段线小锐角检测

FPGA - 7系列 FPGA SelectIO -07- 高级逻辑资源之ISERDESE2

cocoapod中的第三方库怎么引用本地头文件
随机推荐
Apple MDM bypass jailfree bypass MDM configuration lock free
Working principle of es9023 audio decoding chip
socke.io長連接實現推送、版本控制、實時活躍用戶量統計
慢内容广告:品牌增长的长线主义
Alibaba cloud SMS service (Complete Guide), SMS sending function implementation.
cocoapod中的第三方库怎么引用本地头文件
记JPA使用自定义VO接收 JPQL查询结果
JQ picture amplifier
Use the SQL SELECT count distinct query statement to count the total number of unique values of a field in the database
Linux MySQL implements root user login without password
Mosaic data enhanced mosaic
【Paper Reading-3D Detection】Fully Convolutional One-Stage 3D Object Detection on LiDAR Range Images
Linked list (III) - reverse linked list
Valueerror: iterative over raw text documents expected, string object received
深度學習19種損失函數
移动广告发展动向:撬动存量,精细营销
socke. IO long connection enables push, version control, and real-time active user statistics
Lombok @equalsandhashcode annotation how to make objects The equals () method compares only some attributes
How to open UMD, KMD log and dump diagrams in CAMX architecture
5-minute NLP: summary of time chronology from bag of words to transformer