Jenkins installation error

Above is the task link.
As I have installed it many times on my machine and others as well but here I found so many errors while installing. Below are some :
1 – Failed loading plugin “subscription-manager”: cannot import name ‘which’
Failed loading plugin “upload-profile”: cannot import name ‘which’
Failed loading plugin “product-id”: cannot import name ‘which’
Last metadata expiration check: 0:01:03 ago on Thu 27 Jul 2023 02:02:41 PM UTC.
No match for argument: jenkins
Error: Unable to find a match: jenkins

2 – sudo yum install jenkins
Failed loading plugin “subscription-manager”: cannot import name ‘which’
Failed loading plugin “upload-profile”: cannot import name ‘which’
Failed to load plugin “product-id”: cannot import name ‘which’
Extra Packages for Enterprise Linux 8 - x86_64 12 MB/s | 16 MB 00:01
Extra Packages for Enterprise Linux Modular 8 - x86_64 671 kB/s | 733 kB 00:01
No match for argument: Jenkins
Error: Unable to find a match: Jenkins…and many others.

Why it’s so difficult here to install Jenkins?

Hi @uwithnishad,
Thanks for highlighting this. I will check from my end and get back to you.

Regards,

Hi @uwithnishad,
I tried it and didn’t face any problem.


Regards,

In the shared screenshots, I used the dnf tool to install the Jenkins package, but it will work the same for yum utility tool.

Regards,

Linux (jenkins.io)

It did not work for yum but I will try to use dnf as you did then will let you know.
Thanks.

Let me try with yum.

It’s working for me.

Hi @uwithnishad,
Did you add the repository? Without adding that software repositories to the server, you can’t install Jenkins. Unless it’s already available in the existing pre-configured repositories.

Yes. did everything as you mentioned above but still it got failed.

sudo dnf install jenkins
Failed loading plugin “subscription-manager”: cannot import name ‘which’
Failed loading plugin “upload-profile”: cannot import name ‘which’
Failed loading plugin “product-id”: cannot import name ‘which’
Last metadata expiration check: 0:19:07 ago on Thu 03 Aug 2023 12:08:57 PM UTC.
No match for argument: jenkins
Error: Unable to find a match: jenkins

Did you run dnf upgrade?

Finally, it’s done. I tried a different approach and then succeeded.
Thanks.

Great, finally it worked for you. :ok_hand: :ok_hand:

How can I connect you directly? Please advise. a couple of questions to ask.
Thanks.

I spent a whole day trying to figure this thing out. Turns out the version of Java i was installing was not good. I installed Java-11-openjdk (the one installed during the jenkins course.)
I removed that, installed the Java-17-opendjk and it worked.

Here is my script

sudo yum install epel-release -y
sudo yum install java-17-openjdk -y
sudo yum install wget -y
sudo wget -O /etc/yum.repos.d/jenkins.repo https://pkg.jenkins.io/redhat-stable/jenkins.repo --no-check-certificate
sudo rpm --import http://pkg.jenkins.io/redhat-stable/jenkins.io-2023.key
sudo yum update -y
sudo yum install jenkins -y
1 Like

I “solved” this by installing java v11 instead of v17
sudo yum install java-11-openjdk -y.