LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 02-04-2016, 10:26 AM   #1
Lpjj
LQ Newbie
 
Registered: Jun 2013
Posts: 12

Rep: Reputation: Disabled
Angry Help! Tar is missing


Hi, I've been running Mint 17 for some time now. Somehow, now it seems, that Tar is missing from my system. I've tried loading it from Terminal, from Software Manager, and from Synaptic Package Manager, all fail. This is preventing me from downloading other software that I need including JDK,JRE Oracle Java8, and Oracle virtualbox. In the Synaptic Package Manager dpkg shows, Broken dependency due to missing Tar. Does anyone know how to fix this problem? Thankyou!!!

Following is the Terminal history I get when trying to install it:

jack@Built-by-Jack ~ $ tar
The program 'tar' is currently not installed. You can install it by typing:
sudo apt-get install tar
jack@Built-by-Jack ~ $ sudo apt-get install tar
[sudo] password for jack:
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following package was automatically installed and is no longer required:
libcurl3
Use 'apt-get autoremove' to remove it.
Suggested packages:
ncompress tar-scripts
The following NEW packages will be installed:
tar
0 upgraded, 1 newly installed, 0 to remove and 674 not upgraded.
Need to get 0 B/195 kB of archives.
After this operation, 803 kB of additional disk space will be used.
dpkg: warning: 'tar' not found in PATH or not executable
dpkg: error: 1 expected program not found in PATH or not executable
Note: root's PATH should usually contain /usr/local/sbin, /usr/sbin and /sbin
E: Sub-process /usr/bin/dpkg returned an error code (2)

when I try to install Tar from Synaptic Package Manager it fails with this MSG.

(synaptic:21283): GLib-CRITICAL **: g_child_watch_add_full: assertion 'pid > 0' failed
dpkg: warning: 'tar' not found in PATH or not executable
dpkg: error: 1 expected program not found in PATH or not executable
Note: root's PATH should usually contain /usr/local/sbin, /usr/sbin and /sbin
E: Sub-process /usr/bin/dpkg returned an error code (2)
A package failed to install. Trying to recover:
dpkg: warning: 'tar' not found in PATH or not executable
dpkg: error: 1 expected program not found in PATH or not executable
Note: root's PATH should usually contain /usr/local/sbin, /usr/sbin and /sbin
 
Old 02-04-2016, 10:43 AM   #2
kilgoretrout
Senior Member
 
Registered: Oct 2003
Posts: 2,837

Rep: Reputation: 325Reputation: 325Reputation: 325Reputation: 325
Post the output of the following:
Code:
sudo which tar
sudo echo $PATH
The tar command is usually located in /bin in Debian based systems like Mint. If it's not there and won't install you can take a look at this similar post where the guy solved the problem by copying tar into /bin from another working ubuntu system:

https://askubuntu.com/questions/3345...not-executable

Last edited by kilgoretrout; 02-04-2016 at 10:49 AM.
 
1 members found this post helpful.
Old 02-04-2016, 12:42 PM   #3
Lpjj
LQ Newbie
 
Registered: Jun 2013
Posts: 12

Original Poster
Rep: Reputation: Disabled
Thanks so much Kilgoretrout, It looks like exactly the same problem. On my system there is no tar in Bin, like theirs. however, they had another working system to copy it over from, they solved it doing that copy. I don't have another Linux machine around. More Suggestions! Best,
 
Old 02-04-2016, 12:57 PM   #4
ardvark71
LQ Veteran
 
Registered: Feb 2015
Location: USA
Distribution: Lubuntu 14.04, Windows Vista
Posts: 6,277
Blog Entries: 3

Rep: Reputation: 841Reputation: 841Reputation: 841Reputation: 841Reputation: 841Reputation: 841Reputation: 841
Quote:
Originally Posted by Lpjj View Post
Thanks so much Kilgoretrout, It looks like exactly the same problem. On my system there is no tar in Bin, like theirs. however, they had another working system to copy it over from, they solved it doing that copy. I don't have another Linux machine around. More Suggestions! Best,
Hi...

If you would, please post the results of the command kilgoretrout mentioned.

Regards...
 
1 members found this post helpful.
Old 02-04-2016, 03:22 PM   #5
Lpjj
LQ Newbie
 
Registered: Jun 2013
Posts: 12

Original Poster
Rep: Reputation: Disabled
jack@Built-by-Jack ~ $ sudo which tar
jack@Built-by-Jack ~ $ sudo echo tar
tar
jack@Built-by-Jack ~ $ sudo which tar
[sudo] password for jack:
jack@Built-by-Jack ~ $ sudo echo $PATH
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games
jack@Built-by-Jack ~ $
 
Old 02-04-2016, 03:32 PM   #6
Habitual
LQ Veteran
 
Registered: Jan 2011
Location: Abingdon, VA
Distribution: Catalina
Posts: 9,374
Blog Entries: 37

Rep: Reputation: Disabled
You missed half the output message:
dpkg: warning: 'tar' not found in PATH or not executable
Have you checked permissions on /bin/tar ?
 
1 members found this post helpful.
Old 02-04-2016, 03:41 PM   #7
jefro
Moderator
 
Registered: Mar 2008
Posts: 20,692

Rep: Reputation: 3337Reputation: 3337Reputation: 3337Reputation: 3337Reputation: 3337Reputation: 3337Reputation: 3337Reputation: 3337Reputation: 3337Reputation: 3337Reputation: 3337
Agreed. " checked permissions on /bin/tar ?"

May be in some odd location too. Maybe use find -name from /

Some other program may be installed to do a similar task but that isn't what you wanted.
 
Old 02-04-2016, 04:04 PM   #8
kilgoretrout
Senior Member
 
Registered: Oct 2003
Posts: 2,837

Rep: Reputation: 325Reputation: 325Reputation: 325Reputation: 325
Quote:
Agreed. " checked permissions on /bin/tar ?"
He said he already looked in /bin and tar was not there. To be doubly sure run and post the output of:

Code:
$ sudo find / -name "tar"
If "/bin/tar" is not in the output of the above command, tar is not there, just like in the ubuntu thread I posted earlier. If you don't get a location for tar in another location in the above output, it's nowhere on your system. I think that will be the likely outcome here, but I would like it clearly established before continuing.
 
1 members found this post helpful.
Old 02-04-2016, 05:32 PM   #9
Habitual
LQ Veteran
 
Registered: Jan 2011
Location: Abingdon, VA
Distribution: Catalina
Posts: 9,374
Blog Entries: 37

Rep: Reputation: Disabled
Quote:
Originally Posted by kilgoretrout View Post
He said he already looked in /bin and tar was not there. To be doubly sure run and post the output of:

Code:
$ sudo find / -name "tar"
If "/bin/tar" is not in the output of the above command, tar is not there, just like in the ubuntu thread I posted earlier. If you don't get a location for tar in another location in the above output, it's nowhere on your system. I think that will be the likely outcome here, but I would like it clearly established before continuing.
Well, at first he did, then
Quote:
Originally Posted by Lpjj View Post
However, they had another working system to copy it over from, they solved it doing that copy.
I'm confused.

I just wanted to point out that 1\2 the error message was being ignored.
 
1 members found this post helpful.
Old 02-04-2016, 06:07 PM   #10
kilgoretrout
Senior Member
 
Registered: Oct 2003
Posts: 2,837

Rep: Reputation: 325Reputation: 325Reputation: 325Reputation: 325
Quote:
I'm confused.

I just wanted to point out that 1\2 the error message was being ignored.
I understand, but if tar is not there(likely), it's not a permission problem. If it is we can check to see if tar has executable permission.

If tar is not there and won't install, the next step would be to download the tar deb package and try to force the install with dpkg like so:

Code:
$ sudo dpkg -i --force-all <tar deb package>
 
2 members found this post helpful.
Old 02-04-2016, 06:24 PM   #11
Habitual
LQ Veteran
 
Registered: Jan 2011
Location: Abingdon, VA
Distribution: Catalina
Posts: 9,374
Blog Entries: 37

Rep: Reputation: Disabled
Quote:
Originally Posted by kilgoretrout View Post
I understand, but if tar is not there(likely), it's not a permission problem. If it is we can check to see if tar has executable permission.

If tar is not there and won't install, the next step would be to download the tar deb package and try to force the install with dpkg like so:

Code:
$ sudo dpkg -i --force-all <tar deb package>
Gonna be a tough one as dpgk is depending on it...
dpkg: warning: 'tar' not found in PATH or not executable

Download it:
Code:
sudo apt-get download tar
the force-all hopefully will work.

and if it doesn't, depending on the arch, a straight copy from a similar LM system may also work.

Last edited by Habitual; 02-04-2016 at 06:30 PM.
 
1 members found this post helpful.
Old 02-04-2016, 07:44 PM   #12
Lpjj
LQ Newbie
 
Registered: Jun 2013
Posts: 12

Original Poster
Rep: Reputation: Disabled
Ter isnt there!
 
Old 02-04-2016, 08:15 PM   #13
Lpjj
LQ Newbie
 
Registered: Jun 2013
Posts: 12

Original Poster
Rep: Reputation: Disabled
jack@Built-by-Jack ~ $ sudo find / -name "tar"
[sudo] password for jack:
/usr/share/bash-completion/completions/tar
jack@Built-by-Jack ~ $
 
Old 02-04-2016, 08:16 PM   #14
Lpjj
LQ Newbie
 
Registered: Jun 2013
Posts: 12

Original Poster
Rep: Reputation: Disabled
above was after running



sudo apt-get download tar
 
Old 02-04-2016, 08:43 PM   #15
kilgoretrout
Senior Member
 
Registered: Oct 2003
Posts: 2,837

Rep: Reputation: 325Reputation: 325Reputation: 325Reputation: 325
Quote:
Ter isnt there!(sic)
OK. Next, you want to download the tar package from the repo with the command Habitual gave you above, namely:
Code:
$ sudo apt-get download tar
That should download the tar package to /var/cache/apt/archives/ and not attempt to install the package. Actually, it might already be there from your last failed install attempt. You might want to check that first. If you are running 64bit, the tar package will have a name like "tar_1.27.1-1_amd64.deb"; if 32bit, the tar package will have a name like "tar_1.27.1-1_i386.deb". The version numbers may be different but the package names will be something like that. Once you get the tar deb package successfully downloaded, run the following:
Code:
$ cd /var/cache/apt/archives/
$ sudo dpkg -i --force-all <insert name of tar deb package>
If it refuses to install, post the error output.
 
1 members found this post helpful.
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Creating a large tar ile form a sequence of small tar files and one files is missing jyunker Linux - Newbie 4 03-10-2015 02:56 PM
Why joining parted *.tar is missing files, when *.tar itelf have them? UltraMC Linux - Newbie 1 06-27-2012 01:53 PM
Missing tar ball eliteparakeet Linux - Newbie 5 10-31-2011 11:45 AM
BackUp & Restore with TAR (.tar / .tar.gz / .tar.bz2 / tar.Z) asgarcymed Linux - General 5 12-31-2006 02:53 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 10:28 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration