Review your favorite Linux distribution.
Go Back > Forums > Linux Forums > Linux - Software
User Name
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.


  Search this Thread
Old 04-07-2013, 05:32 PM   #1
LQ Newbie
Registered: Apr 2006
Posts: 5

Rep: Reputation: 0
/bin/tar: Cowardly refusing to create an empty archive

Hi all! I am having problems with an installer for a program. The installer itself is a compiled script that wants to use the "tar" command for making some backups prior to actual installation. The problem is that when it calls "tar" to try to do so, it fails with the following message:

/bin/tar: Cowardly refusing to create an empty archive
Try `/bin/tar --help' or `/bin/tar --usage' for more information.
/bin/tar: Cowardly refusing to create an empty archive
Try `/bin/tar --help' or `/bin/tar --usage' for more information.
    while executing
"exec $TAR -cf $backupDir/$backFile -I ./existfiles.txt"
    (procedure "makeBackup" line 18)
    invoked from within
"makeBackup $package "
    (procedure "xtar" line 6)
    invoked from within
"xtar          $fullName $pakName "
    ("tar" arm line 1)
    invoked from within
"switch $tool {
                 "bundle" { set fullName [ extractBundle $fullName $pakName ] }
                 "des"    { set fullName [ des         ..."
    (procedure "installPackage" line 16)
    invoked from within
"installPackage $package  "
    (procedure "installSelectedPackage" line 37)
    invoked from within
    invoked from within
".installpkg.bSelUp invoke"
    ("uplevel" body line 1)
    invoked from within
"uplevel #0[list $w invoke]"
    (procedure "tk::ButtonUp" line 22)
    invoked from within
"tk::ButtonUp .installpkg.bSelUp"
    (command bound to event)
I am able to run this script successfully in a PC with Centos5 (tar --version gives "tar (GNU tar) 1.15.1"), but it fails in a PC with Opensuse 11.4 (tar --version gives "tar (GNU tar) 1.26 [...]").

Note that, as I mentioned before, it is a compiled installer so unfortunately I am not able to change/modify it

I would be really grateful if somebody has any ideas as to how I could bypass this problem!


Old 04-07-2013, 05:53 PM   #2
Registered: Sep 2008
Location: The Netherlands
Distribution: Slackware64 current
Posts: 592

Rep: Reputation: 140Reputation: 140
Maybe you can copy tar from centos to opensuse.
Old 04-07-2013, 06:50 PM   #3
LQ Guru
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

Rep: Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978
The problem is that the resulting command line is malformed
exec $TAR -cf $backupDir/$backFile -I ./existfiles.txt
since the -I option accepts an argument and takes "./existfiles.txt" as the name of a compression program. Therefore the list of files to archive results empty. Moreover, since doubtfully the process tries to archive a single file, -I should rather be -T. I'd tell it's a bug of some sort and in this case you should report it to the software maintainer.

On the other hand, if you suspect the problem is tied to the tar version, you may locally install the older version and temporarily adjust the PATH to point to the (newly installed) older tar. Just for the time of the installation and doing this in the terminal from which you launch the installer. You can find the source code of version 1.15.1 on the official GNU ftp archive.

Another option is to check if the installer has the ability to skip the backup process. Maybe running it with --help?
1 members found this post helpful.
Old 04-07-2013, 08:29 PM   #4
LQ Newbie
Registered: Apr 2006
Posts: 5

Original Poster
Rep: Reputation: 0
Thanks for the ideas!. Since reporting the bug to the developers would take a very long time to solve my problem (if ever), I will try to follow the suggestion of installing an older version of tar (the installer itself doesn't have any help info and the backup step seems un-bypassable!). I'll report on what I find.


Old 04-08-2013, 09:48 AM   #5
Senior Member
Registered: Aug 2009
Distribution: CentOS
Posts: 3,399

Rep: Reputation: 1486Reputation: 1486Reputation: 1486Reputation: 1486Reputation: 1486Reputation: 1486Reputation: 1486Reputation: 1486Reputation: 1486Reputation: 1486
Good luck with that. I looked back at old versions of GNU tar, and previous to the introduction of "-I" as a short form for "--use-compress-program" it wasn't recognized at all.

I suggest writing a small wrapper script that changes "-I" to "-T" before invoking /bin/tar. Name the script "tar" and put it in some directory ahead of /bin in your PATH.


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
Why does "tar" create the path directories to my target in the archive? wh33t Linux - Software 16 10-16-2012 01:52 AM
Error in TAR - tar: GNU features wanted on incompatible archive format. kuldeep.k Linux - General 3 08-14-2009 11:09 AM
tar this does not look like a tar archive exit depalyed from previous error tasay Linux - Software 1 07-01-2009 03:34 PM
Piping tar bzcat to add a file to a tar.bz2 archive DaveQB Linux - Software 0 06-02-2008 08:28 PM
Tar gives error when creating a tar file archive davidas Linux - Newbie 10 04-13-2004 12:35 AM

All times are GMT -5. The time now is 08:20 PM.

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