I installed parcellite
in Ubuntu (downloaded from http://parcellite.sourceforge.net/)
After installing from sources, sudo make install
, I can see that it is installed at below location.
However, when I try to run it, it tries to run it from another path. Why is that?
user$ which parcellite
/usr/local/bin/parcellite
user$ parcellite -h
bash: /usr/bin/parcellite: No such file or directory
$PATH
is as below
/home/user/bin:/usr/lib/lightdm/lightdm:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games
I tried changing ownership of executable as follows. Still the problem persists.
user$ ls -l /usr/local/bin/parcellite
-rwxr-xr-x 1 root root 452K Oct 7 21:00 /usr/local/bin/parcellite
user$sudo chown user:user /usr/local/bin/parcellite
user$ ls -l /usr/local/bin/parcellite
-rwxr-xr-x 1 user user 452K Oct 7 21:01 /usr/local/bin/parcellite
I had an older version of parcellite installed. But I removed it prior to installing new version.
Update: @Fox's solution works. But any idea why which
command gives correct path, despite hash
NOT being updated?
sudo updatedb
but that didn't work. I think that hash commands needs to run automatically each time a program is installed. – xxx374562 Oct 09 '18 at 03:50
– xxx374562 Oct 09 '18 at 03:53hash
is a bash built-in command. The hash table is a feature ofbash
that prevents it from having to search$PATH
every time you type a command by caching the results in memory. The table gets cleared on events that obviously invalidate the results (such as modifying$PATH
)which
command gives correct path, despitehash
NOT being updated? – xxx374562 Oct 09 '18 at 03:56