How reinstall the /bin/echo in my debian?











up vote
0
down vote

favorite












Something wrong for my /bin/echo command.



sudo ls -al  /bin/echo
-rwxr-xr-x 1 root utmp 0 Nov 11 18:05 /bin/echo


method1 to fix it:

I knew that /bin/echo is in coretils.

Remove coreutils first then reinstall it again.



sudo apt-get remove coreutils
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.


I can't remove it ,it is no use to remove it and reinstall coreutils?



method2 to fix it:

compile the echo.c.



cd  /tmp
sudo apt-get source coreutils
cd coreutils-8.26
/tmp/coreutils-8.26$ ./configure
./configure: line 3492: config.log: Permission denied
./configure: line 3502: config.log: Permission denied


Let me config it with sudo.



sudo ./configure
configure: error: you should not run configure as root (set FORCE_UNSAFE_CONFIGURE=1 in environment to bypass this check)


How to fix the /bin/echo in my debian?










share|improve this question


























    up vote
    0
    down vote

    favorite












    Something wrong for my /bin/echo command.



    sudo ls -al  /bin/echo
    -rwxr-xr-x 1 root utmp 0 Nov 11 18:05 /bin/echo


    method1 to fix it:

    I knew that /bin/echo is in coretils.

    Remove coreutils first then reinstall it again.



    sudo apt-get remove coreutils
    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.


    I can't remove it ,it is no use to remove it and reinstall coreutils?



    method2 to fix it:

    compile the echo.c.



    cd  /tmp
    sudo apt-get source coreutils
    cd coreutils-8.26
    /tmp/coreutils-8.26$ ./configure
    ./configure: line 3492: config.log: Permission denied
    ./configure: line 3502: config.log: Permission denied


    Let me config it with sudo.



    sudo ./configure
    configure: error: you should not run configure as root (set FORCE_UNSAFE_CONFIGURE=1 in environment to bypass this check)


    How to fix the /bin/echo in my debian?










    share|improve this question
























      up vote
      0
      down vote

      favorite









      up vote
      0
      down vote

      favorite











      Something wrong for my /bin/echo command.



      sudo ls -al  /bin/echo
      -rwxr-xr-x 1 root utmp 0 Nov 11 18:05 /bin/echo


      method1 to fix it:

      I knew that /bin/echo is in coretils.

      Remove coreutils first then reinstall it again.



      sudo apt-get remove coreutils
      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.


      I can't remove it ,it is no use to remove it and reinstall coreutils?



      method2 to fix it:

      compile the echo.c.



      cd  /tmp
      sudo apt-get source coreutils
      cd coreutils-8.26
      /tmp/coreutils-8.26$ ./configure
      ./configure: line 3492: config.log: Permission denied
      ./configure: line 3502: config.log: Permission denied


      Let me config it with sudo.



      sudo ./configure
      configure: error: you should not run configure as root (set FORCE_UNSAFE_CONFIGURE=1 in environment to bypass this check)


      How to fix the /bin/echo in my debian?










      share|improve this question













      Something wrong for my /bin/echo command.



      sudo ls -al  /bin/echo
      -rwxr-xr-x 1 root utmp 0 Nov 11 18:05 /bin/echo


      method1 to fix it:

      I knew that /bin/echo is in coretils.

      Remove coreutils first then reinstall it again.



      sudo apt-get remove coreutils
      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.


      I can't remove it ,it is no use to remove it and reinstall coreutils?



      method2 to fix it:

      compile the echo.c.



      cd  /tmp
      sudo apt-get source coreutils
      cd coreutils-8.26
      /tmp/coreutils-8.26$ ./configure
      ./configure: line 3492: config.log: Permission denied
      ./configure: line 3502: config.log: Permission denied


      Let me config it with sudo.



      sudo ./configure
      configure: error: you should not run configure as root (set FORCE_UNSAFE_CONFIGURE=1 in environment to bypass this check)


      How to fix the /bin/echo in my debian?







      linux bash debian echo






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Nov 16 at 13:32









      scrapy

      1865




      1865






















          1 Answer
          1






          active

          oldest

          votes

















          up vote
          2
          down vote



          accepted










          Get a proper .deb file:



          mkdir ~/dummy
          cd ~/dummy
          apt-get download coreutils


          Unpack it:



          sudo dpkg-deb -x *.deb ./


          (Note: dpkg-deb can run without sudo but it's easier to unpack as root to obtain the echo file with proper ownership from the beginning).



          The executable you seek is ./bin/echo. Replace /bin/echo:



          sudo mv ./bin/echo /bin/


          Remove the directory:



          cd ~/
          sudo rm -rf ~/dummy





          share|improve this answer























          • That's an odd solution. I'd say a mere # apt install --reinstall coreutils should have worked, no?
            – kostix
            Nov 16 at 15:29










          • @kostix Write an answer and I will upvote it. My answer touches /bin/echo only; the other extremity is to reinstall the entire OS. Your way is somewhere in between.
            – Kamil Maciorowski
            Nov 16 at 15:34













          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',
          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%2f1375996%2fhow-reinstall-the-bin-echo-in-my-debian%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes








          up vote
          2
          down vote



          accepted










          Get a proper .deb file:



          mkdir ~/dummy
          cd ~/dummy
          apt-get download coreutils


          Unpack it:



          sudo dpkg-deb -x *.deb ./


          (Note: dpkg-deb can run without sudo but it's easier to unpack as root to obtain the echo file with proper ownership from the beginning).



          The executable you seek is ./bin/echo. Replace /bin/echo:



          sudo mv ./bin/echo /bin/


          Remove the directory:



          cd ~/
          sudo rm -rf ~/dummy





          share|improve this answer























          • That's an odd solution. I'd say a mere # apt install --reinstall coreutils should have worked, no?
            – kostix
            Nov 16 at 15:29










          • @kostix Write an answer and I will upvote it. My answer touches /bin/echo only; the other extremity is to reinstall the entire OS. Your way is somewhere in between.
            – Kamil Maciorowski
            Nov 16 at 15:34

















          up vote
          2
          down vote



          accepted










          Get a proper .deb file:



          mkdir ~/dummy
          cd ~/dummy
          apt-get download coreutils


          Unpack it:



          sudo dpkg-deb -x *.deb ./


          (Note: dpkg-deb can run without sudo but it's easier to unpack as root to obtain the echo file with proper ownership from the beginning).



          The executable you seek is ./bin/echo. Replace /bin/echo:



          sudo mv ./bin/echo /bin/


          Remove the directory:



          cd ~/
          sudo rm -rf ~/dummy





          share|improve this answer























          • That's an odd solution. I'd say a mere # apt install --reinstall coreutils should have worked, no?
            – kostix
            Nov 16 at 15:29










          • @kostix Write an answer and I will upvote it. My answer touches /bin/echo only; the other extremity is to reinstall the entire OS. Your way is somewhere in between.
            – Kamil Maciorowski
            Nov 16 at 15:34















          up vote
          2
          down vote



          accepted







          up vote
          2
          down vote



          accepted






          Get a proper .deb file:



          mkdir ~/dummy
          cd ~/dummy
          apt-get download coreutils


          Unpack it:



          sudo dpkg-deb -x *.deb ./


          (Note: dpkg-deb can run without sudo but it's easier to unpack as root to obtain the echo file with proper ownership from the beginning).



          The executable you seek is ./bin/echo. Replace /bin/echo:



          sudo mv ./bin/echo /bin/


          Remove the directory:



          cd ~/
          sudo rm -rf ~/dummy





          share|improve this answer














          Get a proper .deb file:



          mkdir ~/dummy
          cd ~/dummy
          apt-get download coreutils


          Unpack it:



          sudo dpkg-deb -x *.deb ./


          (Note: dpkg-deb can run without sudo but it's easier to unpack as root to obtain the echo file with proper ownership from the beginning).



          The executable you seek is ./bin/echo. Replace /bin/echo:



          sudo mv ./bin/echo /bin/


          Remove the directory:



          cd ~/
          sudo rm -rf ~/dummy






          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited Nov 16 at 14:00

























          answered Nov 16 at 13:52









          Kamil Maciorowski

          22.7k155072




          22.7k155072












          • That's an odd solution. I'd say a mere # apt install --reinstall coreutils should have worked, no?
            – kostix
            Nov 16 at 15:29










          • @kostix Write an answer and I will upvote it. My answer touches /bin/echo only; the other extremity is to reinstall the entire OS. Your way is somewhere in between.
            – Kamil Maciorowski
            Nov 16 at 15:34




















          • That's an odd solution. I'd say a mere # apt install --reinstall coreutils should have worked, no?
            – kostix
            Nov 16 at 15:29










          • @kostix Write an answer and I will upvote it. My answer touches /bin/echo only; the other extremity is to reinstall the entire OS. Your way is somewhere in between.
            – Kamil Maciorowski
            Nov 16 at 15:34


















          That's an odd solution. I'd say a mere # apt install --reinstall coreutils should have worked, no?
          – kostix
          Nov 16 at 15:29




          That's an odd solution. I'd say a mere # apt install --reinstall coreutils should have worked, no?
          – kostix
          Nov 16 at 15:29












          @kostix Write an answer and I will upvote it. My answer touches /bin/echo only; the other extremity is to reinstall the entire OS. Your way is somewhere in between.
          – Kamil Maciorowski
          Nov 16 at 15:34






          @kostix Write an answer and I will upvote it. My answer touches /bin/echo only; the other extremity is to reinstall the entire OS. Your way is somewhere in between.
          – Kamil Maciorowski
          Nov 16 at 15:34




















           

          draft saved


          draft discarded



















































           


          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1375996%2fhow-reinstall-the-bin-echo-in-my-debian%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

          Список кардиналов, возведённых папой римским Каликстом III

          Deduzione

          Mysql.sock missing - “Can't connect to local MySQL server through socket”