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

Jenkins 2.60.1-1 installation on ubuntu fails

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Blocker
    • Resolution: Not A Defect
    • Component/s: other
    • Labels:
      None
    • Environment:
      Ubuntu 14.04, Jenkins 2.60.1-1
    • Similar Issues:

      Description

      Installation of Jenkins via apt-get automatically installs JDK9 on the machine. 

      root@***/etc/apt/sources.list.d# apt-get install jenkins
      Reading package lists... Done
      Building dependency tree
      Reading state information... Done
      The following extra packages will be installed:
      daemon gsfonts gsfonts-x11 oracle-java9-installer oracle-java9-set-default
      xfonts-encodings xfonts-utils
      Suggested packages:
      binfmt-support visualvm ttf-baekmuk ttf-unfonts ttf-unfonts-core 
      ttf-kochi-gothic ttf-sazanami-gothic ttf-kochi-mincho ttf-sazanami-mincho
      ttf-arphic-uming firefox firefox-2 iceweasel mozilla-firefox iceape-browser
      mozilla-browser epiphany-gecko epiphany-webkit epiphany-browser galeon
      midbrowser moblin-web-browser xulrunner xulrunner-1.9 konqueror
      chromium-browser midori google-chrome
      The following NEW packages will be installed:
      daemon gsfonts gsfonts-x11 jenkins oracle-java9-installer
      oracle-java9-set-default xfonts-encodings xfonts-utils
      0 upgraded, 8 newly installed, 0 to remove and 4 not upgraded.
      2 not fully installed or removed.

       

        Attachments

          Activity

          Hide
          moshe_zvi Moshe Zvi added a comment -

          Update: Running on a clean machine gives a different error.

          root@***:~# apt-get install jenkins
          Reading package lists... Done
          Building dependency tree
          Reading state information... Done
          Some packages could not be installed. This may mean that you have
          requested an impossible situation or if you are using the unstable
          distribution that some required packages have not yet been created
          or been moved out of Incoming.
          The following information may help to resolve the situation:
          
          The following packages have unmet dependencies:
          jenkins : Depends: default-jre-headless (>= 2:1.8) but it is not going to be installed or
          java8-runtime-headless but it is not installable
          E: Unable to correct problems, you have held broken packages.

          In both cases, Java8 is already installed on the machine:

          root@***:~# java -version
          java version "1.8.0_111"
          Java(TM) SE Runtime Environment (build 1.8.0_111-b14)
          Java HotSpot(TM) 64-Bit Server VM (build 25.111-b14, mixed mode)

           

           

          Show
          moshe_zvi Moshe Zvi added a comment - Update: Running on a clean machine gives a different error. root@***:~# apt-get install jenkins Reading package lists... Done Building dependency tree Reading state information... Done Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. The following information may help to resolve the situation: The following packages have unmet dependencies: jenkins : Depends: default -jre-headless (>= 2:1.8) but it is not going to be installed or java8-runtime-headless but it is not installable E: Unable to correct problems, you have held broken packages. In both cases, Java8 is already installed on the machine: root@***:~# java -version java version "1.8.0_111" Java(TM) SE Runtime Environment (build 1.8.0_111-b14) Java HotSpot(TM) 64-Bit Server VM (build 25.111-b14, mixed mode)    
          Hide
          danielbeck Daniel Beck added a comment -

          Jenkins 2.60.1 is the first LTS to require Java 8 to run as mentioned in the changelog and upgrade guide.

          Based on a web search and results like https://bugs.launchpad.net/trusty-backports/+bug/1368094 it appears that there's no Java 8 in default repos for Ubuntu 14.04. That's a problem with your distro, not Jenkins.

          Regarding Java 8 being installed – if that package doesn't provide the dependency Jenkins checks for, it doesn't count. Perhaps there's a way to ignore the dependency in such a case?

          I'd rather not see the dependency removed from the deb as well just because old Ubuntus are terrible.

          Show
          danielbeck Daniel Beck added a comment - Jenkins 2.60.1 is the first LTS to require Java 8 to run as mentioned in the changelog and upgrade guide. Based on a web search and results like https://bugs.launchpad.net/trusty-backports/+bug/1368094 it appears that there's no Java 8 in default repos for Ubuntu 14.04. That's a problem with your distro, not Jenkins. Regarding Java 8 being installed – if that package doesn't provide the dependency Jenkins checks for, it doesn't count. Perhaps there's a way to ignore the dependency in such a case? I'd rather not see the dependency removed from the deb as well just because old Ubuntus are terrible.
          Hide
          moshe_zvi Moshe Zvi added a comment -

          Thanks for the update.

          I know Java 8 is required, and we therefore pre-install the Oracle JDK. I didn't understand this part:

          Regarding Java 8 being installed – if that package doesn't provide the dependency Jenkins checks for, it doesn't count. Perhaps there's a way to ignore the dependency in such a case?

          I didn't get the "it doesn't count". It seems like Jenkins is checking for a dependency which is openjdk related, and I don't see how I can ignore it. It should maybe be part of the package?

           

          Show
          moshe_zvi Moshe Zvi added a comment - Thanks for the update. I know Java 8 is required, and we therefore pre-install the Oracle JDK. I didn't understand this part: Regarding Java 8 being installed – if that package doesn't provide the dependency Jenkins checks for, it doesn't count. Perhaps there's a way to ignore the dependency in such a case? I didn't get the "it doesn't count". It seems like Jenkins is checking for a dependency which is openjdk related, and I don't see how I can ignore it. It should maybe be part of the package?  
          Hide
          danielbeck Daniel Beck added a comment -

          I didn't get the "it doesn't count". It seems like Jenkins is checking for a dependency which is openjdk related, and I don't see how I can ignore it. It should maybe be part of the package?

          Jenkins doesn't check for the actual presence of Java 8. It declares a dependency on a generic package that any Java 8 should provide. Unfortunately whatever you installed doesn't provide it. E.g. for our RPM packages, we've given up on declaring a dependency and just document the following:

          You will need to explicitly install a Java runtime environment, because Oracle's Java RPMs are incorrect and fail to register as providing a java dependency. Thus, adding an explicit dependency requirement on Java would force installation of the OpenJDK JVM.

          In the case of Debian, Ubuntu (well, 16.04), etc. there are official Java 8 packages, and they satisfy the Jenkins-declared dependency.

          Your package manager should allow you to ignore unsatisfied dependencies, so that may be a feasible way forward.

          Show
          danielbeck Daniel Beck added a comment - I didn't get the "it doesn't count". It seems like Jenkins is checking for a dependency which is openjdk related, and I don't see how I can ignore it. It should maybe be part of the package? Jenkins doesn't check for the actual presence of Java 8. It declares a dependency on a generic package that any Java 8 should provide. Unfortunately whatever you installed doesn't provide it. E.g. for our RPM packages, we've given up on declaring a dependency and just document the following: You will need to explicitly install a Java runtime environment, because Oracle's Java RPMs are incorrect and fail to register as providing a java dependency. Thus, adding an explicit dependency requirement on Java would force installation of the OpenJDK JVM. In the case of Debian, Ubuntu (well, 16.04), etc. there are official Java 8 packages, and they satisfy the Jenkins-declared dependency. Your package manager should allow you to ignore unsatisfied dependencies, so that may be a feasible way forward.
          Hide
          aheritier Arnaud Héritier added a comment -

          Daniel Beck There are some Java 8 packages (from oracle or openjdk) available by default but what happened probably to Moshe Zvi is that if he referenced an additional repository like this one which is providing Java 9 then APT installed the highest version available

          https://launchpad.net/~webupd8team/+archive/ubuntu/java

          I'm really not sure we'll have Jenkins running on Java 9 soon, maybe we should update the dependency to not take > 8 (if possible - I'm not expert cc Sam Van Oort or Kohsuke Kawaguchi maybe)

           

          Show
          aheritier Arnaud Héritier added a comment - Daniel Beck There are some Java 8 packages (from oracle or openjdk) available by default but what happened probably to Moshe Zvi is that if he referenced an additional repository like this one which is providing Java 9 then APT installed the highest version available https://launchpad.net/~webupd8team/+archive/ubuntu/java I'm really not sure we'll have Jenkins running on Java 9 soon, maybe we should update the dependency to not take > 8 (if possible - I'm not expert cc Sam Van Oort or Kohsuke Kawaguchi maybe)  

            People

            Assignee:
            kohsuke Kohsuke Kawaguchi
            Reporter:
            moshe_zvi Moshe Zvi
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: