Skip to content


Subversion checkout URL

You can clone with
Download ZIP


If no unar on Linux, use 7z #136

wants to merge 1 commit into from

10 participants


On some distributions, like Fedora, unar is not readily available from a repository. However 7za, which is generally available from the p7zip package (e.g. is available, and works fine to unzip the large VM files.

Modified the script to check for and use 7za if unar is not available.

@rocketraman rocketraman referenced this pull request

IE9 zipfile corrupt #120


This saved my day on openSUSE 12.3, thank you for that fix!


I cannot see the modified part from rocketraman in master:

hash unar 2>&- || hash 7za 2>&- || fail "Linux support requires unar or 7za (sudo apt-get install for Ubuntu/Debian)"

It is rather painful to compile unar on Centos/Redhat-like machines... Having p7zip came in handy. I could use rocketraman fork in the meanwhile.


@rocketraman Thank you! openSUSE 12.3


Just to mention, I'm on fedora 18 and found where you are led to add a rpm-sphere repo to your /etc/yum.repos.d (personally I would set it to "enabled=0" as I don't trust what else I'm going to start getting as updates from that repo). Then use "yum --enablerepo=rpm-sphere install unar" and you get unar that can process the IE9_Win7 zip.

By the way, it would be nice if the said to install VirtualBox and the reboot if kernel modules were installed. I've installed it fresh a few days ago and forgot that kernel modules would be initialised on reboot, and then failed to install due to kernel modules not being loaded. I know this ought to be standard practise when installing VirtualBox, but I forgot, and others simply may not know.

@justinmk justinmk referenced this pull request from a commit in justinmk/ievms
@justinmk justinmk Support cygwin and mingw
- fixes #80 and #136
- cygwin/mingw: look for 7-zip instead of unar
- linux: fall back to 7-zip if unar is not found
This was referenced

:+1:. Nobody likes doing acrobatics to install an uncommon archiver when there are serviceable common options.


I rebased this pull request on the latest master. Hopefully it will be merged soon so I don't have to keep rebasing it.


#166 obviates that PR.


But I think ievms is a dead project anyways.


Why would you think that?


Because I submitted #166 six months ago, and nothing significant has been committed since then.


@justinmk just because your PR didn't get merged doesn't mean everything that's happened since is insignificant. Thanks for the support though!


It actually didn't even get a response, despite being heavily commented. And, the commit list since the last six months has nothing significant.


@justinmk that's just like, your opinion, man. The past 6 months have seen IE11 support, complete rework of XP VMs guest control, and we made it through the Mavericks/VBox 4.3 clusterfuck. I didn't merge your PR because cygwin/mingw support is not a priority for me - I don't even own a Windows license for testing (hence, this project!) It also introduced changes I was uncomfortable with, commented or not, such as adding 7zip alongside unar. I apologize for not being more vocal but I don't have the time to address every single issue/PR that comes into my life. But don't shit on everyone else's efforts because you got left out this time.


It also introduced changes I was uncomfortable with, commented or not, such as adding 7zip alongside unar

@xdissent Since this is the only aspect of this pull request, may I ask what is the reason you are uncomfortable with this? I'm not sure about @justinmk's pull but this one leaves unar as the default, if it is available or if it is unavailable and a Mac, in which case it continues to install unar as before. The changes in this pull only fall back to 7zip if unar is not found AND it is not a Mac system.


@xdissent I didn't take offense and didn't intend any offense. It is indeed just my opinion.


@rocketraman It makes me uncomfortable because over the past 2 and half years I'm pretty sure we've tried every known open source unarchiving utility, and each had issues. Finally, unar arose as the clear winner in portability and reliability. The details are foggy now, but I still feel the pain and don't want to change without a very strong case. Additionally, supporting two or more different unarchiving utilities is worse than supporting one. That's why it's curl and not curl OR wget OR axis, etc despite some users' very strong opinions. Now, will I change it? It's possible - I do tons of things that make me uncomfortable all the time. When I hear reports that things are breaking, I will fix them, but I don't like to fix just for fixing's sake. Also, IIRC Fedora 18 (last version without unar pkg) reaches its end of life in about a week, and since Fedora is always the distro cited when people complain about unar unavailability, it's about to be even less of an issue. Make sense? So, I will again take a look at all of this over the weekend and make a determination as soon as I can.


@xdissent I confirm that F19+ has unar available ( As another datapoint, I believe someone above in this PR stated that OpenSUSE also does not package unar currently. I don't know if that has changed. In any case, now that Fedora packages unar, I'm good -- just go ahead and close this pull request if you decide not to merge. Thx for all your hard work Greg.

X4 commented

compromise, why not merge it into a branch?

@amolofos amolofos referenced this pull request from a commit in amolofos/ievms
@amolofos amolofos Porting across commit : justinmk@97b820e
Support cygwin and mingw
- fixes #80 and #136
- cygwin/mingw: look for 7-zip instead of unar
- linux: fall back to 7-zip if unar is not found
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Oct 7, 2014
  1. @rocketraman
This page is out of date. Refresh to see the latest.
Showing with 21 additions and 6 deletions.
  1. +1 −1 
  2. +20 −5
2 
@@ -22,7 +22,7 @@ Requirements
* VirtualBox (, select 'command line utilities' during installation
* Curl (Ubuntu: `sudo apt-get install curl`)
-* Linux Only: unar (Ubuntu: `sudo apt-get install unar`)
+* Linux Only: unar (Ubuntu: `sudo apt-get install unar`) OR 7zip (Ubuntu: `sudo apt-get install p7zip-full`)
* Patience
25 100755 → 100644
@@ -173,13 +173,13 @@ install_unar() {
hash unar 2>&- || fail "Could not find unar in ${ievms_home}"
-# Check for the `unar` command, downloading and installing it if not found.
-check_unar() {
+# Check for the `unar` command on Mac, downloading and installing it if not found, or 7z on Linux.
+check_unarchiver() {
if [ "${kernel}" == "Darwin" ]
hash unar 2>&- || install_unar
- hash unar 2>&- || fail "Linux support requires unar (sudo apt-get install for Ubuntu/Debian)"
+ hash unar 2>&- || hash 7za 2>&- || fail "Linux support requires unar or 7za (sudo apt-get install for Ubuntu/Debian)"
@@ -394,7 +394,22 @@ build_ievm() {
download "OVA ZIP" "${url}" "${archive}" "${md5}"
log "Extracting OVA from ${ievms_home}/${archive}"
- unar "${archive}" || fail "Failed to extract ${archive} to ${ievms_home}/${ova}, unar command returned error code $?"
+ unarchiver_command=unar
+ if [ "${kernel}" == "Darwin" ]
+ then
+ unar "${archive}"
+ elif hash unar 2>&-
+ then
+ unar "${archive}"
+ else
+ unarchiver_command=7z
+ 7za e "${archive}"
+ fi
+ if [ "$?" != "0" ]
+ then
+ fail "Failed to extract ${archive} to ${ievms_home}/${ova}," \
+ "${unarchiver_command} command returned error code $?"
+ fi
log "Checking for existing ${vm} VM"
@@ -472,7 +487,7 @@ check_system
# Install each requested virtual machine sequentially.
all_versions="6 7 8 9 10 11"
Something went wrong with that request. Please try again.