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

    Details

    • Type: Bug
    • Status: Open (View Workflow)
    • Priority: Minor
    • Resolution: Unresolved
    • Component/s: packaging
    • Labels:
      None
    • Similar Issues:

      Description

      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.

        Attachments

          Issue Links

            Activity

            juliohm Julio Morimoto created issue -
            juliohm Julio Morimoto made changes -
            Field Original Value New Value
            Summary Unable to upgrade Jenkins on Ubuntu 14.04 LTS using 'apt-get upgrade' Unable to upgrade Jenkins on Ubuntu 14.04 LTS using 'apt-get upgrade' - The following packages have been kept back
            Hide
            sideralis Bernard Gautier added a comment -

            I am facing exactly the same issue.

            Show
            sideralis Bernard Gautier added a comment - I am facing exactly the same issue.
            Hide
            petersv Peter Sveistrup added a comment -

            Also facing the same issue on 14.04 LTS.

            Show
            petersv Peter Sveistrup added a comment - Also facing the same issue on 14.04 LTS.
            Hide
            jbogers 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.

            Show
            jbogers 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.
            jbogers Jeroen Bogers made changes -
            Link This issue is related to JENKINS-43495 [ JENKINS-43495 ]
            Hide
            petersv Peter Sveistrup added a comment -

            Thanks Jeroen Bogers, that solved the problem here for me.

            Show
            petersv Peter Sveistrup added a comment - Thanks Jeroen Bogers , that solved the problem here for me.
            oleg_nenashev Oleg Nenashev made changes -
            Epic Link JENKINS-43500 [ 180815 ]
            oleg_nenashev Oleg Nenashev made changes -
            Assignee Kohsuke Kawaguchi [ kohsuke ]
            Hide
            teilo 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

            Show
            teilo 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
            Hide
            jbogers Jeroen Bogers added a comment - - edited

            James Nord, won't using --nodeps still block the next update of the package (requiring you to always keep using --nodeps)? I cannot find the updating behaviour in the documentation.

            Show
            jbogers Jeroen Bogers added a comment - - edited James Nord , won't using --nodeps still block the next update of the package (requiring you to always keep using --nodeps )? I cannot find the updating behaviour in the documentation.
            Hide
            teilo James Nord added a comment -

            Jeroen Bogers yes you will need to keep this whenever you want to upgrade Jenkins. I don;t think apt has a way like YUM to say enable this source repo so would probably kill most future apt upgrades due to incorrect dependencies.

            Show
            teilo James Nord added a comment - Jeroen Bogers yes you will need to keep this whenever you want to upgrade Jenkins. I don;t think apt has a way like YUM to say enable this source repo so would probably kill most future apt upgrades due to incorrect dependencies.
            Hide
            paladox paladox added a comment -

            Theres an openjdk 8 here https://launchpad.net/~openjdk-r/+archive/ubuntu/ppa for ubuntu.

            Show
            paladox paladox added a comment - Theres an openjdk 8 here https://launchpad.net/~openjdk-r/+archive/ubuntu/ppa  for ubuntu.
            Hide
            danielbeck Daniel Beck added a comment -

            Is there a reasonable solution for this, other than removing the Java dependency as with all other packages?

            Show
            danielbeck Daniel Beck added a comment - Is there a reasonable solution for this, other than removing the Java dependency as with all other packages?
            Hide
            juliohm Julio Morimoto added a comment -

            I'm trying, but --nodeps does not seem like a possible parameter for apt-get.

            $ apt-get install --nodeps jenkins
            E: Command line option --nodeps is not understood
            $ apt-get install --ignore-missing jenkins
            Reading package lists... Done
            Building dependency tree       
            Reading state information... Done
            The following extra packages will be installed:
              jenkins
            0 upgraded, 0 newly installed, 0 to remove and 6 not upgraded.
            
            $ apt-get install --reinstall --ignore-missing jenkins
            Reading package lists... Done
            Building dependency tree       
            Reading state information... Done
            The following extra packages will be installed:
              jenkins
            0 upgraded, 0 newly installed, 0 to remove and 6 not upgraded.

            All of the above have failed.

            $ apt
            apt 1.0.1ubuntu2 for amd64 compiled on Dec  8 2016 16:23:37

            Am I missing something?

            Show
            juliohm Julio Morimoto added a comment - I'm trying, but --nodeps does not seem like a possible parameter for apt-get. $ apt-get install --nodeps jenkins E: Command line option --nodeps is not understood $ apt-get install --ignore-missing jenkins Reading package lists... Done Building dependency tree        Reading state information... Done The following extra packages will be installed:   jenkins 0 upgraded, 0 newly installed, 0 to remove and 6 not upgraded. $ apt-get install --reinstall --ignore-missing jenkins Reading package lists... Done Building dependency tree        Reading state information... Done The following extra packages will be installed:   jenkins 0 upgraded, 0 newly installed, 0 to remove and 6 not upgraded. All of the above have failed. $ apt apt 1.0.1ubuntu2 for amd64 compiled on Dec  8 2016 16:23:37 Am I missing something?
            Hide
            svanoort Sam Van Oort added a comment -

            I used to run Ubuntu 14.04 and also hated the fact that it didn't include Java 8 – did the WebUpd8 PPA path as well.  There's also an option to self-package it too – https://github.com/hgomez/obuildfactory/wiki/How-to-build-and-package-OpenJDK-8-on-Linux  .  

            Daniel Beck I don't think we should be removing the Debian dependency, because that breaks dependency management here for the more recent releases (including 14.10).  

            Julio Morimoto Those should work, and I'm not sure why they don't... but you can always go the dpkg --ignore-depends route.

            Show
            svanoort Sam Van Oort added a comment - I used to run Ubuntu 14.04 and also hated the fact that it didn't include Java 8 – did the WebUpd8 PPA path as well.  There's also an option to self-package it too – https://github.com/hgomez/obuildfactory/wiki/How-to-build-and-package-OpenJDK-8-on-Linux   .   Daniel Beck I don't think we should be removing the Debian dependency, because that breaks dependency management here for the more recent releases (including 14.10).   Julio Morimoto  Those should work, and I'm not sure why they don't... but you can always go the dpkg --ignore-depends route.
            Hide
            juliohm Julio Morimoto added a comment -

            Thanks, Sam Van Oort.

            As far as I can tell from this thread, installing Java from the official Oracle PPA would satisfy the dependency, but we don't feel confortable with that. The server we are dealing with is very delicate. Countless jobs for building an deploying on our infrastucture depend on it, and there are several JDK versions and other build tools already installed manually. We're afraid of causing any damage by installing a JDK globally from the ppa.

            I'll leave this issue free from further scrutiny. We are moving forward using Jenkins' internal upgrade mechanism, since we can rely on that from this point forward.

            Kind regards!

            Show
            juliohm Julio Morimoto added a comment - Thanks, Sam Van Oort . As far as I can tell from this thread, installing Java from the official Oracle PPA would satisfy the dependency, but we don't feel confortable with that. The server we are dealing with is very delicate. Countless jobs for building an deploying on our infrastucture depend on it, and there are several JDK versions and other build tools already installed manually. We're afraid of causing any damage by installing a JDK globally from the ppa. I'll leave this issue free from further scrutiny. We are moving forward using Jenkins' internal upgrade mechanism, since we can rely on that from this point forward. Kind regards!
            oleg_nenashev Oleg Nenashev made changes -
            Epic Link JENKINS-43500 [ 180815 ] JENKINS-40689 [ 177392 ]
            Hide
            oleg_nenashev Oleg Nenashev added a comment -

            We may hit the same for Java 11, moved it to that EPIC for re-review

            Show
            oleg_nenashev Oleg Nenashev added a comment - We may hit the same for Java 11, moved it to that EPIC for re-review

              People

              • Assignee:
                Unassigned
                Reporter:
                juliohm Julio Morimoto
              • Votes:
                4 Vote for this issue
                Watchers:
                11 Start watching this issue

                Dates

                • Created:
                  Updated: