unable to install/recover jenkins after upgrading from ubuntu 12.04 to 14.04

21,848

Solution 1

Jenkins was removed from the official Ubuntu repositories in Trusty. The reasoning was given in https://bugs.launchpad.net/ubuntu/+source/jenkins/+bug/1294005, but the short version is that it's more secure and easier to keep up-to-date if you use the upstream repository from now on. Details on how to do that are available at https://wiki.jenkins-ci.org/display/JENKINS/Installing+Jenkins+on+Ubuntu

Solution 2

installing jenikin

wget -q -O - https://jenkins-ci.org/debian/jenkins-ci.org.key | sudo apt-key add -

sudo sh -c 'echo deb http://pkg.jenkins-ci.org/debian binary/ > /etc/apt/sources.list.d/jenkins.list'

sudo apt-get update

sudo apt-get install jenkins

http://localhost:8080

sudo cat /var/lib/jenkins/secrets/initialAdminPassword (to get admin password)

sudo apt-get update

sudo apt-get install jenkins

you can skip last two lines but I followed that way

Share:
21,848

Related videos on Youtube

Pandya
Author by

Pandya

Started using Linux and StackExchange since Ubuntu 12.04 LTS. Then Upgraded to 14.04 LTS. Now I am using Debian GNU/Linux on my Laptop and PureOS on old Desktop computer. I recommend visiting the Philosophy of GNU Project As I've replaced Ubuntu with Debian GNU/Linux, Now my question(s) are became off-topic on AskUbuntu. So, I continue to Unix & Linux. The second reason for my shifting to U & L is I found U & L more interesting than AU since AU is only Ubuntu specific whereas U & L is a broad concept and in my opinion U & L deserves generic questions. (I know why SE has AU & U & L both).

Updated on September 18, 2022

Comments

  • Pandya
    Pandya over 1 year

    I did an upgrade of Ubuntu from 12.04 to 14.04 and was surprised to discover that my earlier installed and configured jenkins is broken. To add to the misery, if I do an apt-get install jenkins or apt-cache search jenkins. I do not see either jenkins or jenkins-cli or jenkins-common.

    If I do an apt-get install jenkins, I get the error:

    buildman@pluto:~$ sudo apt-get install jenkins
    Reading package lists... Done
    Building dependency tree       
    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
    

    My OS details:

    buildman@pluto:~$ lsb_release -a
    No LSB modules are available.
    Distributor ID: Ubuntu
    Description:    Ubuntu 14.04.1 LTS
    Release:    14.04
    Codename:   trusty
    

    Any pointers on how to get out of the mess (that I created) would be of great help.

  • lazyreader
    lazyreader over 9 years
    Note that you might have to run apt-get remove jenkins jenkins-common in order for your install from the new repository to work. Ubuntu structures the Jenkins .deb differently. And back everything up!
  • Alexander Kuzin
    Alexander Kuzin almost 4 years
    I didn't get it. I looked at Jenkins wiki page, but there is no info about how to install in on Ubuntu 18. I tried to add 'universe' apt repository, but nothing changed
  • lazyreader
    lazyreader almost 4 years
    You need to add the jenkins repository, not a new ubuntu source, as detailed in the second link.