Live-Build lb build “chroot: failed to run command ‘/usr/bin/env’: No such file or directory”












6















I have a problem with live build



$ sudo lb build --interactive shell


returns with



chroot: failed to run command ‘/usr/bin/env’: No such file or directory


does anyone know what is happening?










share|improve this question





























    6















    I have a problem with live build



    $ sudo lb build --interactive shell


    returns with



    chroot: failed to run command ‘/usr/bin/env’: No such file or directory


    does anyone know what is happening?










    share|improve this question



























      6












      6








      6


      1






      I have a problem with live build



      $ sudo lb build --interactive shell


      returns with



      chroot: failed to run command ‘/usr/bin/env’: No such file or directory


      does anyone know what is happening?










      share|improve this question
















      I have a problem with live build



      $ sudo lb build --interactive shell


      returns with



      chroot: failed to run command ‘/usr/bin/env’: No such file or directory


      does anyone know what is happening?







      command-line chroot






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Dec 12 '15 at 11:58







      Hayden

















      asked Dec 12 '15 at 0:47









      HaydenHayden

      3116




      3116






















          2 Answers
          2






          active

          oldest

          votes


















          3














          I had the same thing happen to me and I think it's because my working directory is mounted from my host OS (mac osx) via vagrant.



          P: If the following stage fails, the most likely cause of the problem is with your mirror configuration or a caching proxy.
          P: Running debootstrap...
          mknod: ‘/vagrant/tutorial1/chroot/test-dev-null’: Operation not permitted
          E: Cannot install into target '/vagrant/tutorial1/chroot' mounted with noexec or nodev
          P: Begin unmounting filesystems...
          P: Saving caches...
          chroot: failed to run command ‘/usr/bin/env’: No such file or directory


          The '/usr/bin/env': No such file or directory error is because debootstrap failed, and I'd bet the command being run is something along the lines of: chroot /vagrant/tutorial1/chroot /usr/bin/env FOO=bar baz, and chroot is failing to find /usr/bin/env



          I moved outside of the /vagrant path on my machine and it seems to be working.



          Try looking at earlier messages in the output for clues. Feel free to paste more of the output in here if you are still not certain!






          share|improve this answer
























          • This was, indeed, the source of this problem for me! Weirdly-specific, and probably the first time a “1-point” user has ever helped me in years-upon-years of Stack Exchange use 🤣 — thank you!

            – ELLIOTTCABLE
            Feb 13 '17 at 3:32



















          0














          @kitchen's diagnosis of what the error message means is accurate, but the scenario did not match mine. I found ./chroot/debootstrap/debootstrap.log contains additional information about why the debootstrap command is dying:



          dpkg-deb: error: archive './/var/cache/apt/archives/base-files_10.1ubuntu2_arm64.deb'
          has premature member 'control.tar.xz' before 'control.tar.gz',
          giving up


          It turns out that the dpkg package was outdated. Upgrading it with apt-get install -y dpkg fixed this bug.






          share|improve this answer























            Your Answer








            StackExchange.ready(function() {
            var channelOptions = {
            tags: "".split(" "),
            id: "89"
            };
            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%2faskubuntu.com%2fquestions%2f708659%2flive-build-lb-build-chroot-failed-to-run-command-usr-bin-env-no-such-file%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









            3














            I had the same thing happen to me and I think it's because my working directory is mounted from my host OS (mac osx) via vagrant.



            P: If the following stage fails, the most likely cause of the problem is with your mirror configuration or a caching proxy.
            P: Running debootstrap...
            mknod: ‘/vagrant/tutorial1/chroot/test-dev-null’: Operation not permitted
            E: Cannot install into target '/vagrant/tutorial1/chroot' mounted with noexec or nodev
            P: Begin unmounting filesystems...
            P: Saving caches...
            chroot: failed to run command ‘/usr/bin/env’: No such file or directory


            The '/usr/bin/env': No such file or directory error is because debootstrap failed, and I'd bet the command being run is something along the lines of: chroot /vagrant/tutorial1/chroot /usr/bin/env FOO=bar baz, and chroot is failing to find /usr/bin/env



            I moved outside of the /vagrant path on my machine and it seems to be working.



            Try looking at earlier messages in the output for clues. Feel free to paste more of the output in here if you are still not certain!






            share|improve this answer
























            • This was, indeed, the source of this problem for me! Weirdly-specific, and probably the first time a “1-point” user has ever helped me in years-upon-years of Stack Exchange use 🤣 — thank you!

              – ELLIOTTCABLE
              Feb 13 '17 at 3:32
















            3














            I had the same thing happen to me and I think it's because my working directory is mounted from my host OS (mac osx) via vagrant.



            P: If the following stage fails, the most likely cause of the problem is with your mirror configuration or a caching proxy.
            P: Running debootstrap...
            mknod: ‘/vagrant/tutorial1/chroot/test-dev-null’: Operation not permitted
            E: Cannot install into target '/vagrant/tutorial1/chroot' mounted with noexec or nodev
            P: Begin unmounting filesystems...
            P: Saving caches...
            chroot: failed to run command ‘/usr/bin/env’: No such file or directory


            The '/usr/bin/env': No such file or directory error is because debootstrap failed, and I'd bet the command being run is something along the lines of: chroot /vagrant/tutorial1/chroot /usr/bin/env FOO=bar baz, and chroot is failing to find /usr/bin/env



            I moved outside of the /vagrant path on my machine and it seems to be working.



            Try looking at earlier messages in the output for clues. Feel free to paste more of the output in here if you are still not certain!






            share|improve this answer
























            • This was, indeed, the source of this problem for me! Weirdly-specific, and probably the first time a “1-point” user has ever helped me in years-upon-years of Stack Exchange use 🤣 — thank you!

              – ELLIOTTCABLE
              Feb 13 '17 at 3:32














            3












            3








            3







            I had the same thing happen to me and I think it's because my working directory is mounted from my host OS (mac osx) via vagrant.



            P: If the following stage fails, the most likely cause of the problem is with your mirror configuration or a caching proxy.
            P: Running debootstrap...
            mknod: ‘/vagrant/tutorial1/chroot/test-dev-null’: Operation not permitted
            E: Cannot install into target '/vagrant/tutorial1/chroot' mounted with noexec or nodev
            P: Begin unmounting filesystems...
            P: Saving caches...
            chroot: failed to run command ‘/usr/bin/env’: No such file or directory


            The '/usr/bin/env': No such file or directory error is because debootstrap failed, and I'd bet the command being run is something along the lines of: chroot /vagrant/tutorial1/chroot /usr/bin/env FOO=bar baz, and chroot is failing to find /usr/bin/env



            I moved outside of the /vagrant path on my machine and it seems to be working.



            Try looking at earlier messages in the output for clues. Feel free to paste more of the output in here if you are still not certain!






            share|improve this answer













            I had the same thing happen to me and I think it's because my working directory is mounted from my host OS (mac osx) via vagrant.



            P: If the following stage fails, the most likely cause of the problem is with your mirror configuration or a caching proxy.
            P: Running debootstrap...
            mknod: ‘/vagrant/tutorial1/chroot/test-dev-null’: Operation not permitted
            E: Cannot install into target '/vagrant/tutorial1/chroot' mounted with noexec or nodev
            P: Begin unmounting filesystems...
            P: Saving caches...
            chroot: failed to run command ‘/usr/bin/env’: No such file or directory


            The '/usr/bin/env': No such file or directory error is because debootstrap failed, and I'd bet the command being run is something along the lines of: chroot /vagrant/tutorial1/chroot /usr/bin/env FOO=bar baz, and chroot is failing to find /usr/bin/env



            I moved outside of the /vagrant path on my machine and it seems to be working.



            Try looking at earlier messages in the output for clues. Feel free to paste more of the output in here if you are still not certain!







            share|improve this answer












            share|improve this answer



            share|improve this answer










            answered Dec 17 '15 at 7:49









            kitchenkitchen

            311




            311













            • This was, indeed, the source of this problem for me! Weirdly-specific, and probably the first time a “1-point” user has ever helped me in years-upon-years of Stack Exchange use 🤣 — thank you!

              – ELLIOTTCABLE
              Feb 13 '17 at 3:32



















            • This was, indeed, the source of this problem for me! Weirdly-specific, and probably the first time a “1-point” user has ever helped me in years-upon-years of Stack Exchange use 🤣 — thank you!

              – ELLIOTTCABLE
              Feb 13 '17 at 3:32

















            This was, indeed, the source of this problem for me! Weirdly-specific, and probably the first time a “1-point” user has ever helped me in years-upon-years of Stack Exchange use 🤣 — thank you!

            – ELLIOTTCABLE
            Feb 13 '17 at 3:32





            This was, indeed, the source of this problem for me! Weirdly-specific, and probably the first time a “1-point” user has ever helped me in years-upon-years of Stack Exchange use 🤣 — thank you!

            – ELLIOTTCABLE
            Feb 13 '17 at 3:32













            0














            @kitchen's diagnosis of what the error message means is accurate, but the scenario did not match mine. I found ./chroot/debootstrap/debootstrap.log contains additional information about why the debootstrap command is dying:



            dpkg-deb: error: archive './/var/cache/apt/archives/base-files_10.1ubuntu2_arm64.deb'
            has premature member 'control.tar.xz' before 'control.tar.gz',
            giving up


            It turns out that the dpkg package was outdated. Upgrading it with apt-get install -y dpkg fixed this bug.






            share|improve this answer




























              0














              @kitchen's diagnosis of what the error message means is accurate, but the scenario did not match mine. I found ./chroot/debootstrap/debootstrap.log contains additional information about why the debootstrap command is dying:



              dpkg-deb: error: archive './/var/cache/apt/archives/base-files_10.1ubuntu2_arm64.deb'
              has premature member 'control.tar.xz' before 'control.tar.gz',
              giving up


              It turns out that the dpkg package was outdated. Upgrading it with apt-get install -y dpkg fixed this bug.






              share|improve this answer


























                0












                0








                0







                @kitchen's diagnosis of what the error message means is accurate, but the scenario did not match mine. I found ./chroot/debootstrap/debootstrap.log contains additional information about why the debootstrap command is dying:



                dpkg-deb: error: archive './/var/cache/apt/archives/base-files_10.1ubuntu2_arm64.deb'
                has premature member 'control.tar.xz' before 'control.tar.gz',
                giving up


                It turns out that the dpkg package was outdated. Upgrading it with apt-get install -y dpkg fixed this bug.






                share|improve this answer













                @kitchen's diagnosis of what the error message means is accurate, but the scenario did not match mine. I found ./chroot/debootstrap/debootstrap.log contains additional information about why the debootstrap command is dying:



                dpkg-deb: error: archive './/var/cache/apt/archives/base-files_10.1ubuntu2_arm64.deb'
                has premature member 'control.tar.xz' before 'control.tar.gz',
                giving up


                It turns out that the dpkg package was outdated. Upgrading it with apt-get install -y dpkg fixed this bug.







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Jan 16 at 23:41









                rgovrgov

                1011




                1011






























                    draft saved

                    draft discarded




















































                    Thanks for contributing an answer to Ask Ubuntu!


                    • 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%2faskubuntu.com%2fquestions%2f708659%2flive-build-lb-build-chroot-failed-to-run-command-usr-bin-env-no-such-file%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

                    Questions related to Moebius Transform of Characteristic Function of the Primes

                    List of scandals in India

                    Can not write log (Is /dev/pts mounted?) - openpty in Ubuntu-on-Windows?