Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to fix yum update of Jenkins

I run Amazon AMI EC2 instances. One of the regular tasks is doing a yum update. Normally, this is not an issue. One of the machines runs Jenkins. I tried to do the standard yum update I always do, and I got an error:

Error: Package: jenkins-2.306-1.1.noarch (jenkins)
           Requires: daemonize

I have been investigating this and it seems that this new requirement is very deprecated. I was able to find the source, which hasn't been updated since 2016. The current Jenkins running on that machine seems fine w/o it. Installing the daemonize product from the old source didn't help on a copy of the machine. It still failed on yum update.

like image 312
Richard Haley Avatar asked Aug 16 '21 17:08

Richard Haley


People also ask

How Jenkins works with AWS?

Each Jenkins project has a dedicated workspace directory. This option allows you to wipe out your workspace directory with each new Jenkins build, to keep it clean. Under Build Actions, add a Build Step, and AWS CodeBuild. On the AWS Configurations, choose Manually specify access and secret keys and provide the keys.


5 Answers

Faced same problem while installing jenkins on aws ec2 instance. Below commands worked for me.

  1. sudo amazon-linux-extras install epel -y
  2. sudo yum update -y
  3. sudo yum install jenkins java-1.8.0-openjdk-devel

Reference JIRA ticket : https://issues.jenkins.io/browse/JENKINS-66361

like image 97
Tapan Hegde Avatar answered Nov 04 '22 04:11

Tapan Hegde


I was facing the same issue while configuring jenkins.

As epel was already present but it was not enabled causing the issue I installed and enable epel as

# sudo yum install epel-release -y 
# sudo yum-config-manager --enable epel
# sudo yum install daemonize -y  

then jenkins from - https://archives.jenkins-ci.org/redhat/

sudo wget -O /etc/yum.repos.d/jenkins.repo https://pkg.jenkins.io/redhat/jenkins.repo
sudo rpm --import https://pkg.jenkins.io/redhat/jenkins.io.key

If you've previously imported the key from Jenkins, the rpm --import will fail because you already have a key. Please ignore that and move on.

yum install jenkins
like image 39
ankursingh1000 Avatar answered Nov 04 '22 04:11

ankursingh1000


Use this command:

sudo amazon-linux-extras install epel
like image 26
swati panwar Avatar answered Nov 04 '22 03:11

swati panwar


This issue is reported on the Jenkins bug tracker:

https://issues.jenkins.io/browse/JENKINS-66361

Note there are instructions on the bug report for installing from epel-release.

like image 43
Jacob anderson Avatar answered Nov 04 '22 04:11

Jacob anderson


I solved this problem with these two commands:

curl -LO 'https://rpmfind.net/linux/epel/7/x86_64/Packages/d/daemonize-1.7.7-1.el7.x86_64.rpm'
sudo rpm -Uvh ./daemonize-1.7.7-1.el7.x86_64.rpm
sudo yum install jenkins -y
like image 23
sinem sipahi Avatar answered Nov 04 '22 03:11

sinem sipahi