1

I had a self-compiled program installed on my computer. Tried to delete it by removing all of the folders and files, including the binaries located in usr/local/bin/.

I reinstalled the program from the Ubuntu stable PPA, so now the binaries are in /usr/bin/.

However, when I type the command, in my case ogrinfo --version or gdal-config --version, I get the following output:

-bash: /usr/local/bin/ogrinfo: No such file or directory

If I run type ogrinfo, I get back:

ogrinfo is hashed (/usr/local/bin/ogrinfo)

How do I tell my system to now look for the package in /usr/bin/ instead of /usr/local/bin?

Additional Info

When I was installing the program the first time from source, I did enter these commands which I think may be part of the problem (which I admittedly don't really know what they do exactly)

ldconfig
export PATH=$HOME/gdal-compile/bin:$PATH
export LD_LIBRARY_PATH=$HOME/gdal-compile:$LD_LIBRARY_PATH

1 Answer 1

3

Tell hash to forget the locations:

hash -r

From help hash:

Options:
  -r    forget all remembered locations

More info: Why does `type which` say that `which is hashed`?

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .