# bash doesn't recognize newly installed programs!



## aurora (Jun 9, 2009)

Hello,

Today I have reinstalled 7.2 and then using the ports collection, I've installed a program called cabextract, which is used for extracting MS cab&exe files.

I had previously installed cabextract both on 6.4 and also on 7.2 without any problem and I had managed to run it successfully, e.g. 

```
#cabextract Data.exe
```

used to work and form the cab files.

However, now it doesn't even recognize the command "cabextract".

Could I have missed something? During 7.2 installation I've chosen "all" distributions and almost "all" of the packages.

Waiting for your suggestions,
Thanks.


----------



## DutchDaemon (Jun 9, 2009)

Try again after a [cmd=]hash -r[/cmd]. If that doesn't solve things, see if cabextract actually exists in /usr/local/bin. If it does, see if that path appears in [cmd=]echo $PATH[/cmd].


----------



## adamk (Jun 9, 2009)

Does /usr/local/bin/cabextract exist?

Adam


----------



## aurora (Jun 9, 2009)

*# hash -r* doesn't work either, i.e. it returns:

*hash: command not found*.


----------



## adamk (Jun 9, 2009)

Are you sure  you are using bash?

Adam


----------



## graudeejs (Jun 9, 2009)

run rehash, i bet you use default /bin/csh and don't even realize....

ye, and bash is linuxim


----------



## DutchDaemon (Jun 9, 2009)

Sounds like csh to me ... does rehash work then?


```
Command       External    csh(1)    sh(1)
           hash          No          No        Yes
           rehash        No          Yes       No
```

[cmd=]echo $SHELL[/cmd] will tell you which it is.


----------



## DutchDaemon (Jun 9, 2009)

Bash itself is not a linuxism, it's just the default shell on Linux.


----------



## aurora (Jun 9, 2009)

killasmurf86 said:
			
		

> run rehash, i bet you use default /bin/csh and don't even realize....
> 
> ye, and bash is linuxim



Sorry, out of hurry I've just written it to be bash but, that's right, it's /bin/csh I'm using.

In usr/bin/ there's no entry of "cabextract" though in /usr/port/misc/cabextract /Makefile, PLIST_FILES="bin/cabextract"

Thanks.


----------



## DutchDaemon (Jun 9, 2009)

It's */usr/local/*bin/. All ports have */usr/local/* as the install base.


----------



## adamk (Jun 9, 2009)

It installs to /usr/local/ not /usr

Adam


----------



## aurora (Jun 9, 2009)

#echo $PATH returns

/sbin:/bin:/usr/sbin:
/usr/bin:/usr/games:
/usr/local/sbin:/usr/local/bin:
/root/bin


----------



## adamk (Jun 9, 2009)

Again, does /usr/local/bin/cabextract exist?  Did you run rehash like killasmurf86 suggested?

Adam


----------



## aurora (Jun 9, 2009)

Pardon me, I had a short appointment, now I'm back.


```
#echo $SHELL
```
 --> /bin/csh (as expected)

Well, I ran rehash and then tried hash -r again, the result is unchanged: hash: command not found.

And, /usr/local/bin/cabextract doesn't exist. I don't know where it's installed.


----------



## adamk (Jun 9, 2009)

If /usr/local/bin/cabextract doesn't exist, then it's not installed.

What's the output of 'pkg_info -L cabextract\*' ?

Adam


----------



## aurora (Jun 9, 2009)

'pkg_info -L cabextract\*' returns "*can't find package "cabextract*" installed or in a file!*"

And just right now now did I realize that I had been running only the command "make" and not "make install". I'm terribly sorry for that. The only excuse I have is that I 've been using the command "automake" all day long, which did not require the install & clean options and that made me forget it in the ports collection. 

My apologies & thanks.


----------



## adamk (Jun 9, 2009)

No problem.  I'm sure we've all done that in the past 

Adam


----------

