12

I'm installing Jenkins 1.532-1.1 on Ubuntu 12.04, and I need to install it using apt-get repo. I ran following three commands which installs latest Jenkins just fine:

  • wget -q -O - http://pkg.jenkins-ci.org/debian/jenkins-ci.org.key | apt-key add -
  • echo "deb http://pkg.jenkins-ci.org/debian binary/" >> /etc/apt/sources.list
  • apt-get update

But I need to install this specific version 1.532-1.1 (for a reason that is beyond my control). I tried apt-get install jenkins=1.532-1.1, this gives version not found error.

I've had a look at this link http://pkg.jenkins-ci.org/debian/ but installing *.deb is not option for me.

Any idea how I can install jenkins 1.532-1.1 using apt-get?

Sushan Ghimire
  • 7,307
  • 16
  • 38
  • 65

2 Answers2

8

Install jenkins specific version without using this command apt-get install jenkins.

Solution: Run the following commands (e.g. 1.652 is the jenkins version that you need to install)

$ wget "http://pkg.jenkins-ci.org/debian/binary/jenkins_1.652_all.deb"  
$ dpkg -i jenkins_1.652_all.deb

During the installation dpkg fails with the following error:

dpkg: error processing package jenkins (--install):
 dependency problems - leaving unconfigured
Processing triggers for ureadahead (0.100.0-16) ...
Errors were encountered while processing:
 jenkins

Soultion: This will install the dependencies

$ apt-get -y install -f 

Package download location : http://pkg.jenkins-ci.org/debian/

StephenKing
  • 36,187
  • 11
  • 83
  • 112
Shankar
  • 311
  • 4
  • 20
  • Had to `sudo apt-get purge jenkins` and install again after the `apt-get` fix. Otherwise had the "unit jenkins.service not found". – Nakilon Oct 23 '18 at 12:51
2

From the version 1.532-1.1 that you mention, I'm guessing that you actually want use the LTS release repository (I can only see 1.532.1 though): http://pkg.jenkins-ci.org/debian-stable/

But gareht_bowles is right, it is not in the apt repository any more. You can check it via

apt-cache policy jenkins

You should proceed with the deb file.

planetmaker
  • 5,884
  • 3
  • 28
  • 37
ceilfors
  • 2,617
  • 23
  • 33
  • I am using `Kubuntu 14.04` and i get error while I run `apt-get cache policy jenkins`. Is `apt-cache policy jenkins` correct? – Gluttton Aug 11 '14 at 07:28