个人博客站点:http://www.johnlee.ink/
解决方案:

[root@jenkins data]# rm -f /etc/sysconfig/jenkins

解决思路:
1.通过Yum安装Jenkins提示如下报错

[root@jenkins data]# yum install jenkins-2.204.5-1.1.noarch.rpm
stat: cannot stat ‘/var/cache/jenkins’: No such file or directory
stat: cannot stat ‘/var/log/jenkins’: No such file or directory
stat: cannot stat ‘/var/lib/jenkins’: No such file or directory
error: %pre(jenkins-2.204.5-1.1.noarch) scriptlet failed, exit status 1
Error in PREIN scriptlet in rpm package jenkins-2.204.5-1.1.noarchVerifying  : jenkins-2.204.5-1.1.noarch                                                                    1/1 Failed:jenkins.noarch 0:2.204.5-1.1

2.报错关键:PREIN scriptlet
就是 preinstall scriptlet,这是rpm在安装前执行的一段shell脚本,那么就查看执行的脚本是否能定位问题

[root@jenkins data]# rpm --scripts -qp jenkins-2.204.5-1.1.noarch.rpm > jenkins.log
[root@jenkins data]# ls
jenkins-2.204.5-1.1.noarch.rpm  jenkins.log

3.接下来查看报错的安装脚本,具体定位问题:

[root@jenkins data]# cat jenkins.log
preinstall scriptlet (using /bin/sh):
...if [ -f "/etc/sysconfig/jenkins" ]; thenlogger -t jenkins.installer "Found previous config file /etc/sysconfig/jenkins". "/etc/sysconfig/jenkins"stat --format=%U "/var/cache/jenkins" > "/tmp/jenkins.installer.cacheowner"stat --format=%U "/var/log/jenkins"  >  "/tmp/jenkins.installer.logowner"stat --format=%U ${JENKINS_HOME:-/var/lib/jenkins}  > "/tmp/jenkins.installer.workdirowner"elselogger -t jenkins.installer "No previous config file /etc/sysconfig/jenkins found"fi

这段的意思:如果/etc/sysconfig/jenkins文件存在,执行下面一系列操作(stat …),应该是为了重复安装写的。

4.通过 ls /etc/sysconfig/jenkins查看文件是否真的存在,结果再次安装时确实存在,因此rm删除此文件再重新安装即可.

参考自:https://blog.csdn.net/weixin_33812433/article/details/91487445

yum安装Jenkins报错Error in PREIN scriptlet in rpm package jenkins-2.204.5-1.1.noarch相关推荐

  1. yum安装报错Error in PREIN scriptlet in rpm package

    在安装jenkins的时候一直失败.报错内容是 stat: cannot stat '/var/cache/jenkins': No such file or directory stat: cann ...

  2. CentOS8.3安装时报错: DFN error:Error in POSTTRANS scriptlet in rpm package kernel-core

    CentOS8.3安装时报错: DFN error:Error in POSTTRANS scriptlet in rpm package kernel-core 解决办法: 重新安装,在手动分区时, ...

  3. Mac用Pycharm安装mediapipe报错ERROR: Could not find a version that satisfies the requirement mediapipe

    问题 因为最近要用python做一个手部检测的项目,于是用找了个开源的程序跑了跑,发现安装mediapipe的时候会报错 ERROR: Could not find a version that sa ...

  4. 安装rabbitMq报错:error: unpacking of archive failed on file /usr/lib/rabbitmq/lib/rabbitmq_server-3.8.9

    安装rabbitMq报错: 错误提示:error: unpagacking of archive failed on file /usr/lib/rabbitmq/lib/rabbitmq_serve ...

  5. django2.0 在安装mysqlclient 报错ERROR: Command errored out with exit status 1: python setup.py egg_info

    环境:centos7 +  Django2.0 + python3.6 django2.0连接mysql需要安装PyMySQL和mysqlclient pip3 install PyMySQL pip ...

  6. 在Linux中安装MySQL报错“error: Failed dependencies: mysql-community-libs(x86-32) >= 5.7.9 is needed by my“

    异常 在Linux中安装MySQL报错: 原因 因为缺少相关的依赖,所以要先安装这些依赖才能安装MySQL成功. 解决 (注意:这种方法是错误的,安装后并不能启动MySQL成功) 在每个安装指令后面添 ...

  7. ftp yum 安装软件报错FTP Error 550 - Server denied you to change to the given directory

    yum 源主要为了帮助我们解决在linux平台上,软件之间相互依赖的问题,有在线和离线YUM多种方式.有时候挡在客户现场无法进行联网时,需要部署离线yum 源.离线YUM包可以通过操作系统光盘,HTT ...

  8. linux yum nothing,Centos6.9 yum安装htop报错解决过程

    今天在学习linux过程中需要安装htop,但是我在直接yum -y install htop之后,系统提示: No package htop available. Error: Nothing to ...

  9. 安装kerberos报错 error: command 'gcc' failed with exit status 1

    pip install kerberos 报错:error: command 'gcc' failed with exit status 1 安装环境工具 yum install gcc libffi ...

最新文章

  1. PYTHON2.day07
  2. 20172328 2018-2019《Java软件结构与数据结构》第八周学习总结
  3. swift UI专项训练5 定制视图控制器
  4. 【网络】TCP基础总结
  5. 鸿蒙思维和小央美,北市场附近艺术培训
  6. 简单总结 2019 展望 2020
  7. Spring Cloud Zuul重试机制探秘
  8. 对抗攻击之SMI-FGSM:北航提出用空间动量提高对抗迁移性
  9. 关于idea Tomcat部署的一个小坑
  10. HTML5为输入框添加语音输入功能
  11. NET在后置代码中输入JS提示语句(背景不会变白)
  12. Frame - 快速创建高品质的 Web 应用原型
  13. 阿里矢量图标及其引入方式
  14. 计算VGG16的参数量
  15. Ubuntu12.04 耳机无声 扬声器有声的解决
  16. android 系统安装教程视频,PC也能用安卓 X86系统装安卓视频教程
  17. 怎样清理计算机c盘东西,怎样清理电脑c盘无用的东西(电脑c盘垃圾清理技巧)...
  18. APP在线制作平台,手机应用,手机App开发,手机客户端开发
  19. 抖音小店商品卡访客七天新增1w+ 2023无货源起店方法,重点必看
  20. 安装Linux CentOS7操作系统

热门文章

  1. OpenCV Python学习笔记(5)—— 边缘保留滤波(EPF)
  2. cdr mac majave os_macOS Mojave MAC下载
  3. 面向对象设计思想-基本概念
  4. 超市商品管理系统(c语言)
  5. 计算机构应注意哪些问题,结构设计常见及应注意的问题
  6. robotium无源码环境
  7. Zprotect patch KEY 脱壳
  8. 【Attention,Self-Attention Self Attention Self_Attention】通俗易懂
  9. SLAM学习资料收集
  10. 浙江省计算机二级考试选择判断题库,浙江省计算机等级考试二级判断题和答案...