You are not logged in.

#1 2010-04-11 03:44:34

horsecool
Member
Registered: 2008-12-22
Posts: 55

[sloved] bash can not find commands...

Under terminal, bash keeps saying that "command not found". It even can not find "locate"...

I assume this must be something related to PATH, but I don't know how to fix it..
Thanks!

Last edited by horsecool (2010-04-11 05:25:36)

Offline

#2 2010-04-11 04:18:48

Allan
Pacman
From: Brisbane, AU
Registered: 2007-06-09
Posts: 11,390
Website

Re: [sloved] bash can not find commands...

what does "echo $PATH" give?

Offline

#3 2010-04-11 04:25:38

horsecool
Member
Registered: 2008-12-22
Posts: 55

Re: [sloved] bash can not find commands...

It gives something like this:

/bin:/usr/bin:/sbin:/usr/sbin:/opt/java/jre/bin:/usr/bin/perlbin/site:/usr/bin/perlbin/vendor:/usr/bin/perlbin/core

Offline

#4 2010-04-11 04:29:16

Allan
Pacman
From: Brisbane, AU
Registered: 2007-06-09
Posts: 11,390
Website

Re: [sloved] bash can not find commands...

Well, that looks correct...

what does  "file /usr/bin/locate" give?

Offline

#5 2010-04-11 04:31:24

horsecool
Member
Registered: 2008-12-22
Posts: 55

Re: [sloved] bash can not find commands...

It gives:

/usr/bin/locate: cannot open `/usr/bin/locate' (No such file or directory)

Does this mean "locate" is not installed?

Offline

#6 2010-04-11 04:33:25

Allan
Pacman
From: Brisbane, AU
Registered: 2007-06-09
Posts: 11,390
Website

Re: [sloved] bash can not find commands...

It seems that way...  are there other commands that do not work?

Offline

#7 2010-04-11 04:41:38

horsecool
Member
Registered: 2008-12-22
Posts: 55

Re: [sloved] bash can not find commands...

Well, I just installed Matlab on the server and bash couldn't find it. I had to go to the specific directory to open Matlab. Then I realized that "/usr/local/bin" seems not in $PATH, adding it solved that problem.

But I still can not use "locate"... I installed findutils, and it still does not work..

Offline

#8 2010-04-11 04:54:01

Allan
Pacman
From: Brisbane, AU
Registered: 2007-06-09
Posts: 11,390
Website

Re: [sloved] bash can not find commands...

> pacman -Ss locate
core/findutils 4.4.2-1 (base)
    GNU utilities to locate files
core/mlocate 0.22.4-1
    Faster merging drop-in for slocate

You want the other package big_smile

Offline

#9 2010-04-11 05:25:21

horsecool
Member
Registered: 2008-12-22
Posts: 55

Re: [sloved] bash can not find commands...

problem sloved smile

Thanks a lot!

Offline

Board footer

Powered by FluxBB