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?
linux bash debian echo
add a comment |
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?
linux bash debian echo
add a comment |
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?
linux bash debian echo
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
linux bash debian echo
asked Nov 16 at 13:32
scrapy
1865
1865
add a comment |
add a comment |
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
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
add a comment |
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
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
add a comment |
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
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
add a comment |
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
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
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
add a comment |
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
add a comment |
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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