How to debug dpkg error code (1) on upgrade of deb package?












2















Operating System: Debian GNU/Linux 8.8 (jessie)
Kernel: Linux 3.16.0-4-amd64
Architecture: x86-64


I have several Debian servers.



Each have included in default repository nginx version 1.6.



After updating from original nginx repository, receive same error on all servers:



Preparing to unpack .../nginx_1.12.0-1~jessie_amd64.deb ...
Unpacking nginx (1.12.0-1~jessie) over (1.6.2-5+deb8u4) ...
dpkg: error processing archive /var/cache/apt/archives/nginx_1.12.0-1~jessie_amd64.deb (--unpack):
trying to overwrite '/etc/default/nginx', which is also in package nginx-common 1.6.2-5+deb8u4
dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)
Errors were encountered while processing:
/var/cache/apt/archives/nginx_1.12.0-1~jessie_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)


I've tried to build deb package from source and still get same error.



I can't find any way to upgrade it without reinstalling the Debian to newer version.



/var/log/dpkg.log:



2017-06-26 19:56:31 startup archives install
2017-06-26 19:56:31 upgrade nginx:all 1.6.2-5+deb8u4 1.12.0-1~jessie
2017-06-26 19:56:31 status half-configured nginx:all 1.6.2-5+deb8u4
2017-06-26 19:56:31 status unpacked nginx:all 1.6.2-5+deb8u4
2017-06-26 19:56:31 status half-installed nginx:all 1.6.2-5+deb8u4
2017-06-26 19:56:32 status unpacked nginx:all 1.6.2-5+deb8u4
2017-06-26 19:56:32 status installed nginx:all 1.6.2-5+deb8u4


I've tried to fully uninstall / purge the default nginx and install newer but still get error.



The following packages have been kept back:
libpcre3 libpcre3-dev nginx nginx-common nginx-full
0 upgraded, 0 newly installed, 0 to remove and 5 not upgraded.









share|improve this question





























    2















    Operating System: Debian GNU/Linux 8.8 (jessie)
    Kernel: Linux 3.16.0-4-amd64
    Architecture: x86-64


    I have several Debian servers.



    Each have included in default repository nginx version 1.6.



    After updating from original nginx repository, receive same error on all servers:



    Preparing to unpack .../nginx_1.12.0-1~jessie_amd64.deb ...
    Unpacking nginx (1.12.0-1~jessie) over (1.6.2-5+deb8u4) ...
    dpkg: error processing archive /var/cache/apt/archives/nginx_1.12.0-1~jessie_amd64.deb (--unpack):
    trying to overwrite '/etc/default/nginx', which is also in package nginx-common 1.6.2-5+deb8u4
    dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)
    Errors were encountered while processing:
    /var/cache/apt/archives/nginx_1.12.0-1~jessie_amd64.deb
    E: Sub-process /usr/bin/dpkg returned an error code (1)


    I've tried to build deb package from source and still get same error.



    I can't find any way to upgrade it without reinstalling the Debian to newer version.



    /var/log/dpkg.log:



    2017-06-26 19:56:31 startup archives install
    2017-06-26 19:56:31 upgrade nginx:all 1.6.2-5+deb8u4 1.12.0-1~jessie
    2017-06-26 19:56:31 status half-configured nginx:all 1.6.2-5+deb8u4
    2017-06-26 19:56:31 status unpacked nginx:all 1.6.2-5+deb8u4
    2017-06-26 19:56:31 status half-installed nginx:all 1.6.2-5+deb8u4
    2017-06-26 19:56:32 status unpacked nginx:all 1.6.2-5+deb8u4
    2017-06-26 19:56:32 status installed nginx:all 1.6.2-5+deb8u4


    I've tried to fully uninstall / purge the default nginx and install newer but still get error.



    The following packages have been kept back:
    libpcre3 libpcre3-dev nginx nginx-common nginx-full
    0 upgraded, 0 newly installed, 0 to remove and 5 not upgraded.









    share|improve this question



























      2












      2








      2








      Operating System: Debian GNU/Linux 8.8 (jessie)
      Kernel: Linux 3.16.0-4-amd64
      Architecture: x86-64


      I have several Debian servers.



      Each have included in default repository nginx version 1.6.



      After updating from original nginx repository, receive same error on all servers:



      Preparing to unpack .../nginx_1.12.0-1~jessie_amd64.deb ...
      Unpacking nginx (1.12.0-1~jessie) over (1.6.2-5+deb8u4) ...
      dpkg: error processing archive /var/cache/apt/archives/nginx_1.12.0-1~jessie_amd64.deb (--unpack):
      trying to overwrite '/etc/default/nginx', which is also in package nginx-common 1.6.2-5+deb8u4
      dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)
      Errors were encountered while processing:
      /var/cache/apt/archives/nginx_1.12.0-1~jessie_amd64.deb
      E: Sub-process /usr/bin/dpkg returned an error code (1)


      I've tried to build deb package from source and still get same error.



      I can't find any way to upgrade it without reinstalling the Debian to newer version.



      /var/log/dpkg.log:



      2017-06-26 19:56:31 startup archives install
      2017-06-26 19:56:31 upgrade nginx:all 1.6.2-5+deb8u4 1.12.0-1~jessie
      2017-06-26 19:56:31 status half-configured nginx:all 1.6.2-5+deb8u4
      2017-06-26 19:56:31 status unpacked nginx:all 1.6.2-5+deb8u4
      2017-06-26 19:56:31 status half-installed nginx:all 1.6.2-5+deb8u4
      2017-06-26 19:56:32 status unpacked nginx:all 1.6.2-5+deb8u4
      2017-06-26 19:56:32 status installed nginx:all 1.6.2-5+deb8u4


      I've tried to fully uninstall / purge the default nginx and install newer but still get error.



      The following packages have been kept back:
      libpcre3 libpcre3-dev nginx nginx-common nginx-full
      0 upgraded, 0 newly installed, 0 to remove and 5 not upgraded.









      share|improve this question
















      Operating System: Debian GNU/Linux 8.8 (jessie)
      Kernel: Linux 3.16.0-4-amd64
      Architecture: x86-64


      I have several Debian servers.



      Each have included in default repository nginx version 1.6.



      After updating from original nginx repository, receive same error on all servers:



      Preparing to unpack .../nginx_1.12.0-1~jessie_amd64.deb ...
      Unpacking nginx (1.12.0-1~jessie) over (1.6.2-5+deb8u4) ...
      dpkg: error processing archive /var/cache/apt/archives/nginx_1.12.0-1~jessie_amd64.deb (--unpack):
      trying to overwrite '/etc/default/nginx', which is also in package nginx-common 1.6.2-5+deb8u4
      dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)
      Errors were encountered while processing:
      /var/cache/apt/archives/nginx_1.12.0-1~jessie_amd64.deb
      E: Sub-process /usr/bin/dpkg returned an error code (1)


      I've tried to build deb package from source and still get same error.



      I can't find any way to upgrade it without reinstalling the Debian to newer version.



      /var/log/dpkg.log:



      2017-06-26 19:56:31 startup archives install
      2017-06-26 19:56:31 upgrade nginx:all 1.6.2-5+deb8u4 1.12.0-1~jessie
      2017-06-26 19:56:31 status half-configured nginx:all 1.6.2-5+deb8u4
      2017-06-26 19:56:31 status unpacked nginx:all 1.6.2-5+deb8u4
      2017-06-26 19:56:31 status half-installed nginx:all 1.6.2-5+deb8u4
      2017-06-26 19:56:32 status unpacked nginx:all 1.6.2-5+deb8u4
      2017-06-26 19:56:32 status installed nginx:all 1.6.2-5+deb8u4


      I've tried to fully uninstall / purge the default nginx and install newer but still get error.



      The following packages have been kept back:
      libpcre3 libpcre3-dev nginx nginx-common nginx-full
      0 upgraded, 0 newly installed, 0 to remove and 5 not upgraded.






      debian apt dpkg nginx






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited 2 hours ago









      Rui F Ribeiro

      41.3k1481140




      41.3k1481140










      asked Jun 27 '17 at 0:47









      jonnywatsjonnywats

      1314




      1314






















          2 Answers
          2






          active

          oldest

          votes


















          1














          Become root:



          sudo -i


          or:



          su





          2017-06-26 19:56:31 status half-configured nginx:all 1.6.2-5+deb8u4



          Configure packages:



          dpkg --configure -a




          Fix broken packages:



          apt-get install --fix-broken




          Proceed with upgrade:



          apt-get dist-upgrade





          share|improve this answer

































            0














            It's kind of difficult to tell what you tried when purging + reinstalling, but try this:



            sudo dpkg --purge --force-all nginx nginx-common nginx-full
            sudo apt-get install nginx





            share|improve this answer
























            • This command should always be avoided as it breaks you system more than it repairs.

              – Vlastimil
              Jun 27 '17 at 7:28











            Your Answer








            StackExchange.ready(function() {
            var channelOptions = {
            tags: "".split(" "),
            id: "106"
            };
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function() {
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled) {
            StackExchange.using("snippets", function() {
            createEditor();
            });
            }
            else {
            createEditor();
            }
            });

            function createEditor() {
            StackExchange.prepareEditor({
            heartbeatType: 'answer',
            autoActivateHeartbeat: false,
            convertImagesToLinks: false,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: null,
            bindNavPrevention: true,
            postfix: "",
            imageUploader: {
            brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
            contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
            allowUrls: true
            },
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            });


            }
            });














            draft saved

            draft discarded


















            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f373578%2fhow-to-debug-dpkg-error-code-1-on-upgrade-of-deb-package%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown

























            2 Answers
            2






            active

            oldest

            votes








            2 Answers
            2






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            1














            Become root:



            sudo -i


            or:



            su





            2017-06-26 19:56:31 status half-configured nginx:all 1.6.2-5+deb8u4



            Configure packages:



            dpkg --configure -a




            Fix broken packages:



            apt-get install --fix-broken




            Proceed with upgrade:



            apt-get dist-upgrade





            share|improve this answer






























              1














              Become root:



              sudo -i


              or:



              su





              2017-06-26 19:56:31 status half-configured nginx:all 1.6.2-5+deb8u4



              Configure packages:



              dpkg --configure -a




              Fix broken packages:



              apt-get install --fix-broken




              Proceed with upgrade:



              apt-get dist-upgrade





              share|improve this answer




























                1












                1








                1







                Become root:



                sudo -i


                or:



                su





                2017-06-26 19:56:31 status half-configured nginx:all 1.6.2-5+deb8u4



                Configure packages:



                dpkg --configure -a




                Fix broken packages:



                apt-get install --fix-broken




                Proceed with upgrade:



                apt-get dist-upgrade





                share|improve this answer















                Become root:



                sudo -i


                or:



                su





                2017-06-26 19:56:31 status half-configured nginx:all 1.6.2-5+deb8u4



                Configure packages:



                dpkg --configure -a




                Fix broken packages:



                apt-get install --fix-broken




                Proceed with upgrade:



                apt-get dist-upgrade






                share|improve this answer














                share|improve this answer



                share|improve this answer








                edited Jun 28 '17 at 5:40

























                answered Jun 27 '17 at 7:07









                VlastimilVlastimil

                8,2151464139




                8,2151464139

























                    0














                    It's kind of difficult to tell what you tried when purging + reinstalling, but try this:



                    sudo dpkg --purge --force-all nginx nginx-common nginx-full
                    sudo apt-get install nginx





                    share|improve this answer
























                    • This command should always be avoided as it breaks you system more than it repairs.

                      – Vlastimil
                      Jun 27 '17 at 7:28
















                    0














                    It's kind of difficult to tell what you tried when purging + reinstalling, but try this:



                    sudo dpkg --purge --force-all nginx nginx-common nginx-full
                    sudo apt-get install nginx





                    share|improve this answer
























                    • This command should always be avoided as it breaks you system more than it repairs.

                      – Vlastimil
                      Jun 27 '17 at 7:28














                    0












                    0








                    0







                    It's kind of difficult to tell what you tried when purging + reinstalling, but try this:



                    sudo dpkg --purge --force-all nginx nginx-common nginx-full
                    sudo apt-get install nginx





                    share|improve this answer













                    It's kind of difficult to tell what you tried when purging + reinstalling, but try this:



                    sudo dpkg --purge --force-all nginx nginx-common nginx-full
                    sudo apt-get install nginx






                    share|improve this answer












                    share|improve this answer



                    share|improve this answer










                    answered Jun 27 '17 at 5:12









                    Dan FreiDan Frei

                    39426




                    39426













                    • This command should always be avoided as it breaks you system more than it repairs.

                      – Vlastimil
                      Jun 27 '17 at 7:28



















                    • This command should always be avoided as it breaks you system more than it repairs.

                      – Vlastimil
                      Jun 27 '17 at 7:28

















                    This command should always be avoided as it breaks you system more than it repairs.

                    – Vlastimil
                    Jun 27 '17 at 7:28





                    This command should always be avoided as it breaks you system more than it repairs.

                    – Vlastimil
                    Jun 27 '17 at 7:28


















                    draft saved

                    draft discarded




















































                    Thanks for contributing an answer to Unix & Linux Stack Exchange!


                    • Please be sure to answer the question. Provide details and share your research!

                    But avoid



                    • Asking for help, clarification, or responding to other answers.

                    • Making statements based on opinion; back them up with references or personal experience.


                    To learn more, see our tips on writing great answers.




                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function () {
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f373578%2fhow-to-debug-dpkg-error-code-1-on-upgrade-of-deb-package%23new-answer', 'question_page');
                    }
                    );

                    Post as a guest















                    Required, but never shown





















































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown

































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown







                    Popular posts from this blog

                    サソリ

                    広島県道265号伴広島線

                    Setup Asymptote in Texstudio