Cannot Generate .tar.bz2 File


How do I make a .tar.bz2 from directory tree in Win10?

Trying tar -cjf Archive.tar.bz2 www and getting tar: Can't launch external program: bzip2.

Refs: Cannot Generate .tar File,


Posted 2018-09-20T04:26:24.860

Reputation: 55



Tar is trying to use the bzip2 program for the bz2 compression, but you don't have bzip2 installed, or tar can't find it.

Install bzip2, or if it's already installed then configure it & tar correctly so tar can find it.

You might also consider trying the Windows Subsystem for Linux, if you're not already using it, then you can basically get everything in a Linux distro (Debian, Ubuntu, etc)


Posted 2018-09-20T04:26:24.860

Reputation: 12 097

Just Win10 user. Where is the bz2 install? – flywire – 2018-09-20T05:19:20.493

I'd just install the Windows Subsystem for Linux with Debian or Ubuntu and get all the Linux tools at once, and linux filesystem support to boot. Or you could just search the web for bzip2 for windows but that's (at least seems like) installing anything for Windows, it's the wild west, there's no specific maintainers or anyone checking the files distributed ;-) unlike a linux distribution

– Xen2050 – 2018-09-20T05:31:01.237

@PimpJuiceIT I was exaggerating a little, I'm not extremely familiar with Red Hat but if it's anything like Debian official sources, packages generally get introduced into the unstable (Sid) distribution, and "[o]nce a package has met our criterion for stability and quality of packaging, it will be included in testing... There are strict criteria a package in unstable (see below) must obey before it can be added to testing." Debian Stable "is stable and well tested software, which changes only if major security or usability fixes are incorporated"

– Xen2050 – 2018-09-20T05:46:14.093

Ok... I'm still learning Linux and more on CentOS and Red Hat too I suppose but my background has been more Windows system engineering and administrator server wise so that was interesting you mentioned that. I still have many more hours of Linus repetition to get in, but I'm getting it and learning and so far I like it. Just tuned up some of my systemd and .timers education on an automation project so... Appreciate your thoughts!! – Pimp Juice IT – 2018-09-20T05:51:29.890


@PimpJuiceIT There are lots of unofficial software sources for linux too, like for a specific program, but you have to specifically add the source so should look into it & make sure you at least trust the source a little. Usually they provide source code for the software too, which at least builds trust even if you can't dig through the code looking for "bad stuff" ;-) Ubuntu has PPA's for adding "Personal Package Archives", there's a question about it on askubuntu that might be interesting.

– Xen2050 – 2018-09-20T05:52:56.720

I should have mentioned though, I'm a command line, script, junkie I suppose so I prefer the shell over Linux GUI's so far. I've been more server type systems than desktop versions but once I feel I master what I need there, I'll move on to more of the Linux GUI features, etc. Learning new GUI's at times for me seems to confuse me more than text based manipulation. Thanks for the resources, I have them saved and I understand what you are saying and that's good info so thanks!! – Pimp Juice IT – 2018-09-20T05:56:38.887

1@PimpJuiceIT Welcome :) When I first tried Linux (Ubuntu) I had no idea how to even install any new software, maybe I missed the intro and definitely didn't read their faq's much. Web searches lead to a few "download and run archives" for linux, but getting the right version (that works with other installed packages, even 32/64bit) was a headache & risky like searching for Windows programs from random authors or that get modified by random websites to install "badware." With that much trouble getting something to run on purpose, I wasn't very worried about viruses installing behind my back – Xen2050 – 2018-09-20T06:04:31.530

1The linux terminal's sometimes quick & easy for getting things done, but when a big change like systemd comes along at least the GUI's should still do things about the same. I still just use the gui for network changes for example, though there's probably at least 2 ways to get them done in a terminal but it would be a lot of reading & new commands, compared to a few mouse clicks... Anyway good luck! – Xen2050 – 2018-09-20T06:09:05.600

M$ released tar and one of the options is bzip2, which as far as I can see hasn't been released. Advice to install linux isn't useful because it doesn't integrate with my batch files. (btw, certainly agree with the wild west comment for these utilities.) – flywire – 2018-09-20T06:56:09.597