Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
After emerge sync I get -bash: /usr/bin/ls: No such file
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Duplicate Threads
View previous topic :: View next topic  
Author Message
cayenne
l33t
l33t


Joined: 17 Oct 2002
Posts: 945
Location: New Orleans

PostPosted: Sat Sep 15, 2007 11:46 pm    Post subject: After emerge sync I get -bash: /usr/bin/ls: No such file Reply with quote

Hello all,

I've got an older system....running mythtv..I was getting ready to update it, I did emerge sync, and emerged portage.
along the way I had strange messages saying problems with PROVIDE and USE with relation to opengl and xorg.

I just found a post and I think I fixed that.

However, I've some basic STRANGE problems.

I cannot seem to normall use common command like ls or rm.
When I do ls...I get:

-bash: /usr.bin/ls: No such file or directory

I get the same message for rm.

If I do which ls I get /bin/ls

so, to use these commands I have to use the full path. Can someone give me some idea as to why my system is looking
in /usr/bin for these commands rather than in /bin? Any ideas how to fix this?

This was working prior to my emerge sync problems....

Thanks in advance,

cayenne
_________________
Light travels faster than sound. This is why some people appear bright until you hear them speak.........
Back to top
View user's profile Send private message
Arfrever
Bodhisattva
Bodhisattva


Joined: 29 Apr 2006
Posts: 2463
Location: 異世界

PostPosted: Sat Sep 15, 2007 11:49 pm    Post subject: Reply with quote

Try:
Code:
hash -r


Perduodu linkėjimus
Arfrever
Back to top
View user's profile Send private message
cayenne
l33t
l33t


Joined: 17 Oct 2002
Posts: 945
Location: New Orleans

PostPosted: Sun Sep 16, 2007 12:06 am    Post subject: Thank you!! Reply with quote

Arfrever wrote:
Try:
Code:
hash -r


Perduodu linkėjimus
Arfrever


Thank you!!

That worked!!

Can you tell me what this did....and what exactly may have caused the problem in the first place?
I've never quite run into anything like this before!

Thanx,

cayenne :D
_________________
Light travels faster than sound. This is why some people appear bright until you hear them speak.........
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 21489

PostPosted: Sun Sep 16, 2007 12:24 am    Post subject: Reply with quote

It instructed your shell to forget its cache of where commands were located, so that it would look them up again next time. In older releases, coreutils put symlinks in /usr/bin for some commands. Newer coreutils builds do not do that, but your shell remembered finding the command there from when the symlink existed. The hash -r made it forget that, so now it has rescanned the path and found the real files (in /bin).

You will need to run hash -r once in each shell which was started before you updated coreutils. You will not need to do it in newly started shells. It is probable that you will not need to do this again when the next coreutils update comes out, but that cannot be guaranteed until we see the released version.
Back to top
View user's profile Send private message
desultory
Bodhisattva
Bodhisattva


Joined: 04 Nov 2005
Posts: 9410

PostPosted: Tue Sep 25, 2007 4:57 am    Post subject: Reply with quote

Moved from Portage & Programming to Duplicate Threads, the cause and solution have already been presented in topic "[solved] no coreutils in /usr/bin".
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Duplicate Threads All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum