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

Installation from jenkins-ci repository fails on Ubuntu 12.04 when jenkins is already installed

    • Icon: Bug Bug
    • Resolution: Not A Defect
    • Icon: Minor Minor
    • core
    • Ubuntu 12.04

      Error from dpkg while installing from the jenkins-ci apt repository:

      Unpacking jenkins (from .../archives/jenkins_1.510_all.deb) ...
      dpkg: error processing /var/cache/apt/archives/jenkins_1.510_all.deb (--unpack):
       trying to overwrite '/usr/share/jenkins/jenkins.war', which is also in package jenkins-common 1.424.6+dfsg-1ubuntu0.1
      

      Steps to reproduce:

      1. Install jenkins from the standard Ubuntu repositories. (currently 1.424). Ubuntu splits jenkins into packages jenkins and jenkins-common.
      2. Add the jenkins-ci repository to /etc/apt/sources.list.
      3. apt-get update
      4. apt-get -u upgrade
        • observe that jenkins will be upgraded. Note that jenkins-common is not mentioned.
      5. During upgrade, apt reports the error shown above.

      Suggested fix: Consider adding "conflicts: jenkins-common".

          [JENKINS-17573] Installation from jenkins-ci repository fails on Ubuntu 12.04 when jenkins is already installed

          Workaround:
          Uninstall the Ubuntu-provided jenkins installation before installing the latest snapshots from the jenkins-ci repository:

          apt-get remove jenkins jenkins-common
          

          Christian Tellefsen added a comment - Workaround: Uninstall the Ubuntu-provided jenkins installation before installing the latest snapshots from the jenkins-ci repository: apt-get remove jenkins jenkins-common

          Sorin Sbarnea added a comment -

          Tried the workaround and remove jenkins. After this I tried to install it again but I've got

          root@smini:/etc/nginx/sites-enabled# apt-get install jenkins
          Reading package lists... Done
          Building dependency tree
          Reading state information... Done
          The following NEW packages will be installed
            jenkins
          0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
          Need to get 0 B/61.2 MB of archives.
          After this operation, 67.3 MB of additional disk space will be used.
          Selecting previously unselected package jenkins.
          (Reading database ... 277604 files and directories currently installed.)
          Unpacking jenkins (from .../archives/jenkins_1.555_all.deb) ...
          Processing triggers for ureadahead ...
          Setting up jenkins (1.555) ...
          start: Job failed to start
          invoke-rc.d: initscript jenkins, action "start" failed.
          dpkg: error processing jenkins (--configure):
           subprocess installed post-installation script returned error exit status 1
          No apport report written because MaxReports has already been reached
                                                                              Errors were encountered while processing:
           jenkins
          E: Sub-process /usr/bin/dpkg returned an error code (1)
          

          Sorin Sbarnea added a comment - Tried the workaround and remove jenkins. After this I tried to install it again but I've got root@smini:/etc/nginx/sites-enabled# apt-get install jenkins Reading package lists... Done Building dependency tree Reading state information... Done The following NEW packages will be installed jenkins 0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. Need to get 0 B/61.2 MB of archives. After this operation, 67.3 MB of additional disk space will be used. Selecting previously unselected package jenkins. (Reading database ... 277604 files and directories currently installed.) Unpacking jenkins (from .../archives/jenkins_1.555_all.deb) ... Processing triggers for ureadahead ... Setting up jenkins (1.555) ... start: Job failed to start invoke-rc.d: initscript jenkins, action "start" failed. dpkg: error processing jenkins (--configure): subprocess installed post-installation script returned error exit status 1 No apport report written because MaxReports has already been reached Errors were encountered while processing: jenkins E: Sub-process /usr/bin/dpkg returned an error code (1)

          Swapnil Mate added a comment -

          We are also facing the same issue, with error

          trying to overwrite '/usr/share/jenkins/jenkins.war', which is also in package jenkins-common 1.424.6+dfsg-1ubuntu0.1

          Swapnil Mate added a comment - We are also facing the same issue, with error trying to overwrite '/usr/share/jenkins/jenkins.war', which is also in package jenkins-common 1.424.6+dfsg-1ubuntu0.1

          Daniel Beck added a comment -

          Not a critical issue. Workaround is trivial, just download the war file.

          Unrelated to Debian Package Builder plugin.

          Are conflicts like this actually something that usually is resolved in the upstream projects that host their own repository? I'd expect this to be something solved in the distro's repo.

          Daniel Beck added a comment - Not a critical issue. Workaround is trivial, just download the war file. Unrelated to Debian Package Builder plugin. Are conflicts like this actually something that usually is resolved in the upstream projects that host their own repository? I'd expect this to be something solved in the distro's repo.

          dmw dmw added a comment -

          According to /var/log/upstart/jenkins.log, the error is due to:

          /proc/self/fd/9: 4: /proc/self/fd/9: /bin/maintain-plugins.sh: not found

          Which itself appears to relate to an out of date /etc/default/jenkins. maintain-plugins.sh appears to be from some old version of the Debian package.

          Commenting out the maintain-plugin.sh line allows the job to start.

          I'd like to register my deep digust at having to reveal my web traffic to a monopolistic, politically active global spyware provider in order to leave this comment. It is deeply unfair to force contributors into such situations. Could the Jira admin please investigate removal of RECAPCHA as a priority?

          dmw dmw added a comment - According to /var/log/upstart/jenkins.log, the error is due to: /proc/self/fd/9: 4: /proc/self/fd/9: /bin/maintain-plugins.sh: not found Which itself appears to relate to an out of date /etc/default/jenkins. maintain-plugins.sh appears to be from some old version of the Debian package. Commenting out the maintain-plugin.sh line allows the job to start. I'd like to register my deep digust at having to reveal my web traffic to a monopolistic, politically active global spyware provider in order to leave this comment. It is deeply unfair to force contributors into such situations. Could the Jira admin please investigate removal of RECAPCHA as a priority?

          April Morone added a comment -

          I have had this same issue. I find that the versions of Jenkins can cause this. For example, getting the version of Jenkins from the Synaptic Package Manager installs one version than the one online or even from the Ubuntu software store. Debian vs tomcat, etc. I had downloaded the .war version, but it did no good, stating that there is already file of that type in Jenkins-commons, as well as in var/usr/share file. And it was conflicting. But, I still got that message even after I deleted that extra .war file. I did a delete of the Jenkins Jenkins commons, yet still got errors. I will try figuring this out and then report back what I figure out.

          April Morone added a comment - I have had this same issue. I find that the versions of Jenkins can cause this. For example, getting the version of Jenkins from the Synaptic Package Manager installs one version than the one online or even from the Ubuntu software store. Debian vs tomcat, etc. I had downloaded the .war version, but it did no good, stating that there is already file of that type in Jenkins-commons, as well as in var/usr/share file. And it was conflicting. But, I still got that message even after I deleted that extra .war file. I did a delete of the Jenkins Jenkins commons, yet still got errors. I will try figuring this out and then report back what I figure out.

          April Morone added a comment -

          dmw damw,
          I didn't have a problem starting it. I just did my host http://myServer:8080 (not going to give what that name of it is), and it started up. Jenkins worked. I just had conflict wen I tried to update to a newer version.

          April Morone added a comment - dmw damw, I didn't have a problem starting it. I just did my host http://myServer:8080 (not going to give what that name of it is), and it started up. Jenkins worked. I just had conflict wen I tried to update to a newer version.

          April Morone added a comment -

          Christian Tellefsen,
          Thank you. Your advise worked like a charm.
          April Morone

          April Morone added a comment - Christian Tellefsen, Thank you. Your advise worked like a charm. April Morone

          Daniel Beck added a comment -

          Not a problem with the Jenkins project provided packages, but rather interaction with downstream packaging/OS config. Therefore resolving as Not A Defect.

          Daniel Beck added a comment - Not a problem with the Jenkins project provided packages, but rather interaction with downstream packaging/OS config. Therefore resolving as Not A Defect.

            Unassigned Unassigned
            christte Christian Tellefsen
            Votes:
            2 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: