无法在 centos 9 中安装 jenkins

无法在 centos 9 中安装 jenkins

我曾多次尝试按照官方网站的说明安装 jenkins。但都失败了。下面我给出了说明。

sudo wget -O /etc/yum.repos.d/jenkins.repo \
https://pkg.jenkins.io/redhat-stable/jenkins.repo
sudo rpm --import https://pkg.jenkins.io/redhat-stable/jenkins.io.key
sudo yum upgrade
# Add required dependencies for the jenkins package
sudo yum install java-11-openjdk
sudo yum install jenkins
sudo systemctl daemon-reload

虽然我没有使用这个命令,sudo yum install java-11-openjdk因为我已经安装了 Oracle JDK 17 和 8。

下面是错误堆栈信息:

    Total                                                                                                                                                         17 MB/s |  87 MB     00:05
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing        :                                                                                                                                                                     1/1
  Running scriptlet: jenkins-2.346.2-1.1.noarch                                                                                                                                          1/1
  Installing       : jenkins-2.346.2-1.1.noarch                                                                                                                                          1/1
Error unpacking rpm package jenkins-2.346.2-1.1.noarch
  Verifying        : jenkins-2.346.2-1.1.noarch                                                                                                                                          1/1

Failed:
  jenkins-2.346.2-1.1.noarch

Error: Transaction failed

我甚至尝试过直接下载 RPM,但是出现了关键问题。

错误日志:

[root@vmi640623 tmp]# cd /home/ftp
[root@vmi640623 ftp]# rpm -ivh jenkins-2.346.2.2-1.1.noarch.rpm
warning: jenkins-2.346.2.2-1.1.noarch.rpm: Header V4 RSA/SHA1 Signature, key ID 9ff90bda: NOKEY
error: Failed dependencies:
        daemonize is needed by jenkins-2.346.2.2-1.1.noarch
[root@vmi640623 ftp]#

相关内容