How do I deal with “unpacking of archive failed … cpio: symlink”?












2















I've gotten stuck on a problem. I'm packaging an existing project into an RPM. It builds fine but when I run



sudo yum localinstal --nogpgcheck <path to rpm>



I get the following error message:



Error: unpacking of archive failed on file <path to symlink>;5656d545: cpio: symlink



The RPM extracts the project into a directory and then updates an existing symlink latest to point to it by doing ln -sfn <app name and version>/ latest



Google yields next to nothing on this issue so I'm hoping that someone with more experience in these matters could offer a hand.










share|improve this question





























    2















    I've gotten stuck on a problem. I'm packaging an existing project into an RPM. It builds fine but when I run



    sudo yum localinstal --nogpgcheck <path to rpm>



    I get the following error message:



    Error: unpacking of archive failed on file <path to symlink>;5656d545: cpio: symlink



    The RPM extracts the project into a directory and then updates an existing symlink latest to point to it by doing ln -sfn <app name and version>/ latest



    Google yields next to nothing on this issue so I'm hoping that someone with more experience in these matters could offer a hand.










    share|improve this question



























      2












      2








      2








      I've gotten stuck on a problem. I'm packaging an existing project into an RPM. It builds fine but when I run



      sudo yum localinstal --nogpgcheck <path to rpm>



      I get the following error message:



      Error: unpacking of archive failed on file <path to symlink>;5656d545: cpio: symlink



      The RPM extracts the project into a directory and then updates an existing symlink latest to point to it by doing ln -sfn <app name and version>/ latest



      Google yields next to nothing on this issue so I'm hoping that someone with more experience in these matters could offer a hand.










      share|improve this question
















      I've gotten stuck on a problem. I'm packaging an existing project into an RPM. It builds fine but when I run



      sudo yum localinstal --nogpgcheck <path to rpm>



      I get the following error message:



      Error: unpacking of archive failed on file <path to symlink>;5656d545: cpio: symlink



      The RPM extracts the project into a directory and then updates an existing symlink latest to point to it by doing ln -sfn <app name and version>/ latest



      Google yields next to nothing on this issue so I'm hoping that someone with more experience in these matters could offer a hand.







      linux symbolic-link rpm centos-7






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Feb 5 at 22:04









      kenorb

      11.5k1580116




      11.5k1580116










      asked Nov 26 '15 at 10:16









      majumaju

      13113




      13113






















          2 Answers
          2






          active

          oldest

          votes


















          4














          This happen when rpm package owns some directory or file while on the disk the file/directory is symlink. Or vice versa.
          This is known issue for long time.



          You either have to manually remove the symlink before installing/upgrading the package. Or alter the package to not own that file.






          share|improve this answer
























          • Related: I was getting error: unpacking of archive failed: cpio: lstat because I had a stray file on the filesystem where the RPM expected a directory to be.

            – Matt Chambers
            Aug 28 '17 at 20:55



















          0














          I had a similar problem with CentOS 7.6 and Crystal.



          Downloading packages:
          crystal-0.27.2-1.x86_64.rpm | 38 MB 00:00:02
          Running transaction check
          Running transaction test
          Transaction test succeeded
          Running transaction
          Installing : crystal-0.27.2-1.x86_64 1/1
          Error unpacking rpm package crystal-0.27.2-1.x86_64
          error: unpacking of archive failed on file /usr/share/crystal/src/lib_c/amd64-unknown-openbsd: cpio: rename
          Verifying : crystal-0.27.2-1.x86_64 1/1

          Failed:
          crystal.x86_64 0:0.27.2-1

          Complete!


          I ended up deleting the entire path in question: /usr/share/crystal/*
          which solved the problem.






          share|improve this answer























            Your Answer








            StackExchange.ready(function() {
            var channelOptions = {
            tags: "".split(" "),
            id: "3"
            };
            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: true,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: 10,
            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%2fsuperuser.com%2fquestions%2f1005740%2fhow-do-i-deal-with-unpacking-of-archive-failed-cpio-symlink%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









            4














            This happen when rpm package owns some directory or file while on the disk the file/directory is symlink. Or vice versa.
            This is known issue for long time.



            You either have to manually remove the symlink before installing/upgrading the package. Or alter the package to not own that file.






            share|improve this answer
























            • Related: I was getting error: unpacking of archive failed: cpio: lstat because I had a stray file on the filesystem where the RPM expected a directory to be.

              – Matt Chambers
              Aug 28 '17 at 20:55
















            4














            This happen when rpm package owns some directory or file while on the disk the file/directory is symlink. Or vice versa.
            This is known issue for long time.



            You either have to manually remove the symlink before installing/upgrading the package. Or alter the package to not own that file.






            share|improve this answer
























            • Related: I was getting error: unpacking of archive failed: cpio: lstat because I had a stray file on the filesystem where the RPM expected a directory to be.

              – Matt Chambers
              Aug 28 '17 at 20:55














            4












            4








            4







            This happen when rpm package owns some directory or file while on the disk the file/directory is symlink. Or vice versa.
            This is known issue for long time.



            You either have to manually remove the symlink before installing/upgrading the package. Or alter the package to not own that file.






            share|improve this answer













            This happen when rpm package owns some directory or file while on the disk the file/directory is symlink. Or vice versa.
            This is known issue for long time.



            You either have to manually remove the symlink before installing/upgrading the package. Or alter the package to not own that file.







            share|improve this answer












            share|improve this answer



            share|improve this answer










            answered Nov 26 '15 at 13:07









            msuchymsuchy

            40626




            40626













            • Related: I was getting error: unpacking of archive failed: cpio: lstat because I had a stray file on the filesystem where the RPM expected a directory to be.

              – Matt Chambers
              Aug 28 '17 at 20:55



















            • Related: I was getting error: unpacking of archive failed: cpio: lstat because I had a stray file on the filesystem where the RPM expected a directory to be.

              – Matt Chambers
              Aug 28 '17 at 20:55

















            Related: I was getting error: unpacking of archive failed: cpio: lstat because I had a stray file on the filesystem where the RPM expected a directory to be.

            – Matt Chambers
            Aug 28 '17 at 20:55





            Related: I was getting error: unpacking of archive failed: cpio: lstat because I had a stray file on the filesystem where the RPM expected a directory to be.

            – Matt Chambers
            Aug 28 '17 at 20:55













            0














            I had a similar problem with CentOS 7.6 and Crystal.



            Downloading packages:
            crystal-0.27.2-1.x86_64.rpm | 38 MB 00:00:02
            Running transaction check
            Running transaction test
            Transaction test succeeded
            Running transaction
            Installing : crystal-0.27.2-1.x86_64 1/1
            Error unpacking rpm package crystal-0.27.2-1.x86_64
            error: unpacking of archive failed on file /usr/share/crystal/src/lib_c/amd64-unknown-openbsd: cpio: rename
            Verifying : crystal-0.27.2-1.x86_64 1/1

            Failed:
            crystal.x86_64 0:0.27.2-1

            Complete!


            I ended up deleting the entire path in question: /usr/share/crystal/*
            which solved the problem.






            share|improve this answer




























              0














              I had a similar problem with CentOS 7.6 and Crystal.



              Downloading packages:
              crystal-0.27.2-1.x86_64.rpm | 38 MB 00:00:02
              Running transaction check
              Running transaction test
              Transaction test succeeded
              Running transaction
              Installing : crystal-0.27.2-1.x86_64 1/1
              Error unpacking rpm package crystal-0.27.2-1.x86_64
              error: unpacking of archive failed on file /usr/share/crystal/src/lib_c/amd64-unknown-openbsd: cpio: rename
              Verifying : crystal-0.27.2-1.x86_64 1/1

              Failed:
              crystal.x86_64 0:0.27.2-1

              Complete!


              I ended up deleting the entire path in question: /usr/share/crystal/*
              which solved the problem.






              share|improve this answer


























                0












                0








                0







                I had a similar problem with CentOS 7.6 and Crystal.



                Downloading packages:
                crystal-0.27.2-1.x86_64.rpm | 38 MB 00:00:02
                Running transaction check
                Running transaction test
                Transaction test succeeded
                Running transaction
                Installing : crystal-0.27.2-1.x86_64 1/1
                Error unpacking rpm package crystal-0.27.2-1.x86_64
                error: unpacking of archive failed on file /usr/share/crystal/src/lib_c/amd64-unknown-openbsd: cpio: rename
                Verifying : crystal-0.27.2-1.x86_64 1/1

                Failed:
                crystal.x86_64 0:0.27.2-1

                Complete!


                I ended up deleting the entire path in question: /usr/share/crystal/*
                which solved the problem.






                share|improve this answer













                I had a similar problem with CentOS 7.6 and Crystal.



                Downloading packages:
                crystal-0.27.2-1.x86_64.rpm | 38 MB 00:00:02
                Running transaction check
                Running transaction test
                Transaction test succeeded
                Running transaction
                Installing : crystal-0.27.2-1.x86_64 1/1
                Error unpacking rpm package crystal-0.27.2-1.x86_64
                error: unpacking of archive failed on file /usr/share/crystal/src/lib_c/amd64-unknown-openbsd: cpio: rename
                Verifying : crystal-0.27.2-1.x86_64 1/1

                Failed:
                crystal.x86_64 0:0.27.2-1

                Complete!


                I ended up deleting the entire path in question: /usr/share/crystal/*
                which solved the problem.







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Feb 5 at 22:01









                Steffen RollerSteffen Roller

                11517




                11517






























                    draft saved

                    draft discarded




















































                    Thanks for contributing an answer to Super User!


                    • 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%2fsuperuser.com%2fquestions%2f1005740%2fhow-do-i-deal-with-unpacking-of-archive-failed-cpio-symlink%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

                    Сан-Квентин

                    8-я гвардейская общевойсковая армия

                    Алькесар