0

Im not a linux admin by far but ive been playing with node lately... a package im trying to use wasnt happy with b/c tar and i found i was running tar (GNU tar) 1.15.1

i downloaded the new version to /usr/local/src unpacked it and installed it with ./configure FORCE_UNSAFE_CONFIGURE=1 --bindir=/usr/local/bin/ make make install

I had to use force unsafe because i couldnt run configure without being root i told it to use --bindir=/usr/local/bin/ because I wanted it to be my default tar i got the path by doing 'which tar' and i got the path /usr/local/bin/tar

so now the new tar is installed but when i do 'tar --version' i still see old version number

how do i set the new tar to be the default?

Carter Cole
  • 103
  • 3

1 Answers1

1

If you type:

/usr/local/bin/tar --version

what do you see?

If that is the correct version, then make sure that /usr/local/bin is at the beginning of your PATH (and that you don't have a tar alias overriding anything).

By default /usr/local/bin should come before /bin (which is where the CentOS provided tar lives). You can type echo $PATH, to verify.

Chad Feller
  • 776
  • 5
  • 6
  • /usr/local/bin/tar --version is showing tar (GNU tar) 1.26 like it should and my path is /usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin:/usr/local/rvm/bin:/home/ccole/bin so /usr/local/bin is first but still wrong... theres an old copy in /usr/bin/ how do i remove it? do i just copy over it? how do i check for alias? Thank you for your help – Carter Cole Aug 17 '11 at 21:34
  • `/usr/local/bin` is still ahead of `/usr/bin` in your PATH, so it should be sourcing that first (bash executes the first match it finds). Have you tried logging out and logging back in? I've seen issues where [bash caches paths to executables](http://unix.stackexchange.com/questions/5609/how-do-i-clear-bashs-cache-of-paths-to-executables). You can logout and log back in or, according to that post, run `hash -d tar` – Chad Feller Aug 17 '11 at 21:42