I am new to Jenkins and I have encountered some issues with the task to install Jenkins. I have followed several tutorials/Ubuntu installation manuals online, all of which fail ti install Jenkins on the Jenkins server:
Here are the steps that I have taken so far:
# From Jump Server
ssh root@jenkins S3curePass
cat /etc/*release //Ubuntu 16.04
# Install Java
apt update
apt search openjdk
apt install openjdk-8-dbg
java -version
# add the key
wget -q -O - https://pkg.jenkins.io/debian/jenkins.io.key | sudo apt-key add -
sh -c 'echo deb https://pkg.jenkins.io/debian binary/ > \
/etc/apt/sources.list.d/jenkins.list'
apt update
apt install jenkins // error...see below
# 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
# Solution ?? => https://www.blackmoreops.com/2014/12/13/fixing-error-package-packagename-not-available-referred-another-package-may-mean-package-missing-obsoleted-available-another-source-e-pa/
apt update && apt upgrade -y && apt dist-upgrade -y && apt install jenkins
# Package 'jenkins' has no installation candidate
# E: The method driver /usr/lib/apt/methods/https could not be found.
# N: Is the package apt-transport-https installed?
# E: Failed to fetch https://pkg.jenkins.io/debian/binary/InRelease
# E: Some index files failed to download. They have been ignored, or old ones used instead.
apt install apt-transport-https
systemctl status jenkins
# Failed to connect to bus: No such file or directory
apt list --installed | grep jenkins //not listed
Hi, I’m a newbie like you but perhaps this will help:
add a line in your /etc/apt/sources.list
deb Debian Jenkins Packages binary/
This was mentioned at Debian Jenkins Packages
I hope you get it!
Thank you for responding. I tried that and all I get are errors in return:
N: Is the package apt-transport-https installed?
E: Failed to fetch https://pkg.jenkins.io/debian/binary/InRelease
E: Some index files failed to download. They have been ignored, or old ones used instead.
root@jenkins:~# apt-get install jenkins
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package jenkins
PS. …see @tgp 's post if you’re curious. That helped a lot.
Thank you for this. I am on the right track now with these steps (minus the sudo command):
ssh root@jenkins S3curePass
apt-get update
apt install python-software-properties
apt install openjdk-8-jdk
wget -q -O - https://pkg.jenkins.io/debian-stable/jenkins.io.key | sudo apt-key add -
sudo sh -c 'echo deb https://pkg.jenkins.io/debian-stable binary/ > \
/etc/apt/sources.list.d/jenkins.list'
apt install apt-transport-https
apt update
apt install jenkins
service jenkins start
service jenkins status
# go to host 1 => 8081
cat /var/log/jenkins/jenkins.log //get default password
# install plugins + create admin user w/ credentials
All of the errors that I was getting are gone now. Yay!!
I was initially confused/unsure as to what/which binary (ie., stable vs debian-stable) to add to /etc/apt/sources.list.d/jenkins.list, so that that one of the steps that was tripping me up.
The other step that I had not seen mentioned in any of the tutorials that I had come across is apt install python-software-properties. Why is this step needed? …just curious.
Thanks a lot for your help!!
PS.
Unfortunately, I STILL failed the task. It says that I have the wrong username/password set up…even though I have copy/pasted the username/password directly from the lab portal. …argh…
python-software-properties is the software that provides an abstraction of the used apt repositories. It allows you to easily manage your distribution and independent software vendor software sources.