yeshwanthlm / installing-jenkins

23 stars 129 forks source link

E: Package 'jenkins' has no installation candidate #1

Open ankitAMD opened 1 year ago

ankitAMD commented 1 year ago

root@ip-172-31-46-99:~# echo deb [signed-by=/usr/share/keyrings/jenkins-keyring. asc] \

https://pkg.jenkins.io/debian-stable binary/ | sudo tee \

/etc/apt/sources.list.d/jenkins.list > /dev/null deb [signed-by=/usr/share/keyrings/jenkins-keyring.asc] -bash: https://pkg.jenkins.io/debian-stable: No such file or directory -bash: /etc/apt/sources.list.d/jenkins.list: Permission denied root@ip-172-31-46-99:~# sudo apt-get update

sudo apt-get install jenkins

sudo systemctl status jenkins Hit:1 http://us-east-2.ec2.archive.ubuntu.com/ubuntu jammy InRelease Hit:2 http://us-east-2.ec2.archive.ubuntu.com/ubuntu jammy-updates InRelease Hit:3 http://us-east-2.ec2.archive.ubuntu.com/ubuntu jammy-backports InRelease Ign:4 https://pkg.jenkins.io/debian-stable binary/ InRelease Get:5 https://pkg.jenkins.io/debian-stable binary/ Release [2044 B] Get:6 https://pkg.jenkins.io/debian-stable binary/ Release.gpg [833 B] Hit:7 http://security.ubuntu.com/ubuntu jammy-security InRelease Ign:6 https://pkg.jenkins.io/debian-stable binary/ Release.gpg Reading package lists... Done W: GPG error: https://pkg.jenkins.io/debian-stable binary/ Release: The followin g signatures couldn't be verified because the public key is not available: NO_PU BKEY 5BA31D57EF5975CA E: The repository 'https://pkg.jenkins.io/debian-stable binary/ Release' is not signed. N: Updating from such a repository can't be done securely, and is therefore disabled by default. N: See apt-secure(8) manpage for repository creation and user configuration details. Reading package lists... Done Building dependency tree... Done Reading state information... Done Package Jenkins is not available but is referred to by another package. This may mean that the package is missing, has been obsoleted, or is only available from another source

E: Package 'Jenkins' has no installation candidate

ankitAMD commented 1 year ago

Solution:
first command 1:

curl -fsSL https://pkg.jenkins.io/debian-stable/jenkins.io-2023.key | sudo tee \ /usr/share/keyrings/jenkins-keyring.asc > /dev/null

Then add a Jenkins apt repository entry: second command:-

echo deb [signed-by=/usr/share/keyrings/jenkins-keyring.asc] \ https://pkg.jenkins.io/debian-stable binary/ | sudo tee \ /etc/apt/sources.list.d/jenkins.list > /dev/null

run these it worked for me

sudo apt-get update sudo apt-get install fontconfig openjdk-11-jre sudo apt-get install jenkins