Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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?

share|improve this question

closed as off topic by Zoredache, Iain, Shane Madden, womble, RobM Aug 17 '11 at 21:53

Questions on Server Fault are expected to relate to server, networking, or related infrastructure administration within the scope defined by the community. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about reopening questions here.If this question can be reworded to fit the rules in the help center, please edit the question.

    
how is this off topic of serverfault? –  Carter Cole Aug 17 '11 at 22:21

1 Answer 1

up vote 1 down vote accepted

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.

share|improve this answer
    
/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. You can logout and log back in or, according to that post, run hash -d tar –  Chad Feller Aug 17 '11 at 21:42

Not the answer you're looking for? Browse other questions tagged or ask your own question.