您的位置:首页 > 其它

安装Jenkins,提示:stat: cannot stat ‘/var/cache/jenkins

mymvp 2021-02-22 15:06 78 查看 https://blog.51cto.com/1329307
Linux centos7安装Jenkins( jenkins-2.227-1.1.noarch.rpm)时遇到问题:

1.  出现问题1:安装jenkins一直失败,提示No such file or directory

[helen@linuxprobe Jenkins]$ sudo rpm -ivh jenkins-2.227-1.1.noarch.rpm

Preparing...                          ################################# [100%]

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.227-1.1.noarch) scriptlet failed, exit status 1

error: jenkins-2.227-1.1.noarch: install failed

-->原因:之前已经有了/etc/sysconfig/jenkins

解决方法:

进入/etc/sysconfig,删除掉jenkins,重新安装.

rm -rf jenkins

备注:sudo是因为不是root用户,无权限,所以使用sudo

如果是root用户,则不需要,直接rpm -ivh jenkins-2.227-1.1.noarch.rpm
标签: 
相关文章推荐