一个伪linux粉丝的blog

  1. 首页
  2. unix/linux
  3. 正文

lftp-4.9.2-centos-rpmbuild

27 2 月, 2021 861点热度 0人点赞 0条评论

这也是“为了这点醋,包的这顿饺子”系列---之 lftp 打包的故事。

起因:

以前折腾的一个监控摄像头,支持ftp上传突发视频,很长时间没管,前2天发现ftp根目录下有数万视频,看着太不直观了,于是写了一个简单(丑陋)的脚本,按月移动一下文件。

折腾:

测试脚本的时候,一行行执行ok,整段执行的时候,出现匹配*号的问题,看到了一个新参数mmv,支持*通配符(2017年上线),centos 7上的 lftp 停留在2013年的4.4.8版。

找到一个LFTP-4.8.4 RPM Spec for CentOS 7,于是改了版本4.9.2 ,用rpmbuild打了一个rpm包,戳这里可以直接用。lftp-rpm/lftp-4.9.2-3.el7.x86_64.rpm

写这篇的时候,发现另一个 lftp.spec 已经直接是 4.9.2 了,还备注了中韩波兰等国家语言,下次有空再折腾吧。

排障:

最后说一下rpmbuild过程中的几个报错如何解决的。

报错代码

报错
checking for style of include used by make... GNU
checking for x86_64-redhat-linux-gnu-gcc... no
checking for gcc... no
checking for x86_64-redhat-linux-gnu-cc... no
checking for cc... no
checking for x86_64-redhat-linux-gnu-cl.exe... no
checking for cl.exe... no
checking for x86_64-redhat-linux-gnu-clang... no
checking for clang... no
configure: error: in /root/rpmbuild/BUILD/lftp-4.9.2':
configure: error: no acceptable C compiler found in $PATH
See config.log' for more details
错误:/var/tmp/rpm-tmp.guxOAd (%build) 退出状态不好
或者
checking for MD5 in -lcrypto... no
configure: error: openssl development library not found for MD5
错误:/var/tmp/rpm-tmp.lzo9L8 (%build) 退出状态不好

原因

上面几个报错是缺少开发编译环境,

解决

安装下面的包即可。

yum install gcc rpm-build rpm-devel rpmlint make python bash coreutils diffutils
sudo yum groupinstall 'Development Tools'
yum install openssl-devel

最后执行rpmbuild -ba lftp.spec ,打包成功,测试ftp站点,成功,问题解决。


参考了这里

https://developer.ibm.com/zh/technologies/linux/articles/l-lo-rpm-build-package/

相关文章:

  1. aws ec2 instance terminate
  2. how to root Android 11 on your Pixel 3XL
  3. CentOS Kernel Upgrade
  4. How to check container id through dm disk path
标签: 暂无
最后更新:19 12 月, 2021

wanjie

这个人很懒,什么都没留下

点赞
< 上一篇
下一篇 >

文章评论

razz evil exclaim smile redface biggrin eek confused idea lol mad twisted rolleyes wink cool arrow neutral cry mrgreen drooling persevering
取消回复

This site uses Akismet to reduce spam. Learn how your comment data is processed.

归档
分类
  • network / 332篇
  • Uncategorized / 116篇
  • unix/linux / 121篇
  • 业界资讯 / 38篇
  • 公司杂事 / 11篇
  • 数码影像 / 12篇
  • 美剧 / 3篇
  • 美图共赏 / 21篇
  • 英语学习 / 3篇
标签聚合
ldap nexus 浏览器 kernel Ubuntu squid 天翼live 虚拟主机 dreamhost空间 VPS ssh d90 deepseek openssl debian jira 网站运营 kubectl postgres dreamhost wget Google Voice Nginx Google 泰国 邮件归档 k8s docker google-chrome gitlab

COPYRIGHT © 2008-2025 wanjie.info. ALL RIGHTS RESERVED.

Theme Kratos Made By Seaton Jiang