Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-43629

Unable to upgrade Jenkins on Ubuntu 14.04 LTS using 'apt-get upgrade' - The following packages have been kept back

    • Icon: Bug Bug
    • Resolution: Won't Fix
    • Icon: Minor Minor
    • packaging
    • None

      We are just now experiencing this issue with upgrades from the official jenkins-ci.org repo. After upgrading one of our staging environments, we moved on our production server, only to find out the jenkins package has been kept back.

      root@deployer-dev:~# apt-get update
      ###
      ### previous/unrelated lines removed for brevity
      ### 
      Ign http://pkg.jenkins-ci.org binary/ InRelease                     
      Hit http://ppa.launchpad.net trusty InRelease                             
      Hit http://pkg.jenkins-ci.org binary/ Release.gpg                          
      Hit http://pkg.jenkins-ci.org binary/ Release                       
      Hit http://pkg.jenkins-ci.org binary/ Packages                     
      Ign http://pkg.jenkins-ci.org binary/ Translation-en_US
      Ign http://pkg.jenkins-ci.org binary/ Translation-en
      Reading package lists... Done
      root@deployer-dev:~# apt-get upgrade
      Reading package lists... Done
      Building dependency tree       
      Reading state information... Done
      Calculating upgrade... Done
      The following packages have been kept back:
        jenkins
      0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.
      

      We've tried several apt-get commands to force the upgrade

      $ apt-get dist-upgrade
      $ apt-get dist-upgrade jenkins
      $ apt-get upgrade jenkins
      $ apt-get install --reinstall jenkins

      ... but the package just won't install. We know that it can be manually and easily be upgraded, but we'd rather use the standard apt-get upgrade process we've always used in the past for consistency.

      The new version is listed, but it won't upgrade.

      root@deployer-dev:~# apt-cache policy jenkins
      jenkins:
        Installed: 2.52
        Candidate: 2.55
        Version table:
           2.55 0
              500 http://pkg.jenkins-ci.org/debian/ binary/ Packages
       *** 2.52 0
              100 /var/lib/dpkg/status
      

      We've also managed to upgrade all other linux packages on this machine, except Jenkins. Some more info about this particular server:

      $ root@deployer-dev:~# lsb_release -a
      No LSB modules are available.
      Distributor ID:    Ubuntu
      Description:    Ubuntu 14.04.5 LTS
      Release:    14.04
      Codename:    trusty
      
      $ uname -a
      Linux deployer-dev 3.13.0-116-generic #163-Ubuntu SMP Fri Mar 31 14:13:22 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux

      Oddly enough, one of our staging environments is running Ubuntu 16.04 LTS, where the upgrade worked normally.

      Would it be possible to provide any clues to resolve this?

      Kind regards.

          [JENKINS-43629] Unable to upgrade Jenkins on Ubuntu 14.04 LTS using 'apt-get upgrade' - The following packages have been kept back

          Julio Morimoto created issue -
          Julio Morimoto made changes -
          Summary Original: Unable to upgrade Jenkins on Ubuntu 14.04 LTS using 'apt-get upgrade' New: Unable to upgrade Jenkins on Ubuntu 14.04 LTS using 'apt-get upgrade' - The following packages have been kept back

          I am facing exactly the same issue.

          Bernard Gautier added a comment - I am facing exactly the same issue.

          Also facing the same issue on 14.04 LTS.

          Peter Sveistrup added a comment - Also facing the same issue on 14.04 LTS.

          Jeroen Bogers added a comment - - edited

          This issue is due to the new Java 8 dependency. If you download the jenkins_2.56_all.deb package from https://pkg.jenkins.io/debian/ and open it with the Ubuntu Software Center it will complain that it cannot satisfy the the following dependency: default-jre-headless|java8-runtime-headless

          Neither the default-jre-headless or java8-runtime-headless packages are available for Ubuntu 14.04. I think there is no official Java 8 available for 14.04 at all...

          Update: If you install Java 8 using the instructions from http://www.webupd8.org/2012/09/install-oracle-java-8-in-ubuntu-via-ppa.html the dependencies will be satisfied.

          Jeroen Bogers added a comment - - edited This issue is due to the new Java 8 dependency. If you download the jenkins_2.56_all.deb package from https://pkg.jenkins.io/debian/ and open it with the Ubuntu Software Center it will complain that it cannot satisfy the the following dependency: default-jre-headless|java8-runtime-headless Neither the default-jre-headless or java8-runtime-headless packages are available for Ubuntu 14.04. I think there is no official Java 8 available for 14.04 at all... Update: If you install Java 8 using the instructions from http://www.webupd8.org/2012/09/install-oracle-java-8-in-ubuntu-via-ppa.html the dependencies will be satisfied.
          Jeroen Bogers made changes -
          Link New: This issue is related to JENKINS-43495 [ JENKINS-43495 ]

          Thanks jbogers, that solved the problem here for me.

          Peter Sveistrup added a comment - Thanks jbogers , that solved the problem here for me.
          Oleg Nenashev made changes -
          Epic Link New: JENKINS-43500 [ 180815 ]
          Oleg Nenashev made changes -
          Assignee Original: Kohsuke Kawaguchi [ kohsuke ]

          James Nord added a comment -

          or use --nodeps flag with apt-get and install the JDK manually from Oracle which is certified for Ubuntu 14.04

          James Nord added a comment - or use - -nodeps flag with apt-get and install the JDK manually from Oracle which is certified for Ubuntu 14.04

            Unassigned Unassigned
            juliohm Julio Morimoto
            Votes:
            4 Vote for this issue
            Watchers:
            13 Start watching this issue

              Created:
              Updated:
              Resolved: