I am trying to extract an SFX file under Linux Mint 15 (64 bit) but it's not working. I've done chmod +x on the file and tried to run it like a script with no luck (it gives me an error that there's no such file or directory. What's interesting is that this worked for me when I was running Linux Mint 14 (64 bit). I found an article that mentions glibc support and how newer distributions have removed 32 bit glibc binaries but I'm not quite sure if this is accurate in my case since I'm not running RHEL.

EDIT: I forgot to mention that I tried the solution posted on that article but it did not fix my problem.

I've also tried using 7z, 7za, unzip, and unzipsfx with no success. unzipsfx gives me the error "unzipsfx: cannot find myself! [unzipsfx]" which I find rather strange.

A quick note: The sfx relies on six other archives in the rar format. I'm not dealing with zip, 7z, or any other format like that.

Am I doing something wrong? Something must have changed between distributions since extracting worked fine for me before...

migrated from serverfault.com Jun 11 '13 at 20:54

This question came from our site for system and network administrators.

  • 2
    since you are talking rar sfx, have you tried unrar? also check the format version of your archive. if it's the new RAR5 - this would be the reason why your old tricks did not work. – Alex P. Jun 11 '13 at 20:29
  • Thanks Alex. Your suggestion of trying unrar did the trick. Figures, the one binary I didn't try to extract it ends up working :) – Aaron Jun 11 '13 at 20:47
  • By the way, how would I go about checking the format version of the archive? I want to see if the files are of the new format that you talked about... – Aaron Jun 11 '13 at 20:48
  • list the archive contents with unrar l archive.rar and the format version would be in the rightmost column. 2.9 = RAR4, 5.0 = RAR5 – Alex P. Jun 11 '13 at 20:57
  • Okay thank you. It is in fact 2.9 so it's not the new format. – Aaron Jun 11 '13 at 21:03
up vote 19 down vote accepted

Use unrar to extract files from RAR SFX archives.

Like this: unrar x filename.sfx

  • Thanks to you and Alex. This worked fine. I don't know why I didn't try this first. I guess I was confused as to why my old way didn't work anymore. – Aaron Jun 11 '13 at 21:04
  • unrar -x {filename.sfx} – Fedir RYKHTIK May 15 '14 at 16:18
  • 3
    unrar x filename.sfx (no dash before the x) – hughes Jun 9 '14 at 16:08
  • Just for the record, it also worked for me using the unrar 4.20 version installed through macports on OSX, Mavericks 10.9.5, – drodbar Jan 14 '15 at 23:43

For Linux Ubuntu 12.04 the following works:

$ chmod +x some_file.part1.sfx

$ ./some_file.part1.sfx
  • That's strange. I did use it that way in past and just did it couple of minutes ago. Ubuntu 12.04 LTS modern.ie/en-us/virtualization-tools#downloads Here I got the sfx files (choose Linux and the archives). – Artur Barseghyan Feb 18 '14 at 9:00
  • It should be possible if the header of the file is correct (ie. some sort of shebang or binary). Your answer came up for review, I had not heard of that, Googled and found that reference on wikipedia. – Anthon Feb 18 '14 at 9:39
  • I downloaded one of the files, I can unrar -l it and it is an executable according to 'file', but it cannot be run under Windows. So it seems there are multiple formats and I don't think you can use your solution if you have SFX file created for Windows. BTW this uncompresses to something only 1% bigger than the SFX file... – Anthon Feb 18 '14 at 10:23
  • Well, from the title of this topic "Extracting SFX files in Linux" I understood that it's about extracting the SFX files in Linux. If I'm not mistaken, on Windows RAR splits files into parts having the first one to be an executable (exe). I haven't tried to create SFX files on Windows and then unpack them on Linux. But, at least for certain SFX archives, the method mentioned above works on Linux (at least Debian). – Artur Barseghyan Feb 18 '14 at 13:46
  • I assume the file, if made executable, would extract the contents. I just did not want to risk running such a unknown executable for which I have not seen the source on my system. – Anthon Feb 18 '14 at 14:20

In Nautilus (File Browser), rename the .sfx part to .rar, then right-click and extract. Or double-click for more options.

I came across a similar issue and since it hasn't been mentioned I'd thought to share it here.

On Ubuntu 17.10, I've got the following file:

file file.rar 
file.rar: RAR archive data, v5

Trying to extract it with unrar x file.rar told me that this is a SFX file:

unrar 0.0.1  Copyright (C) 2004  Ben Asselstine, Jeroen Dekkers
unknown archive type, only plain RAR 2.0 supported(normal and solid archives), SFX and Volumes are NOT supported!

However using (the separate from unrar) rar command (apt-get install rar) did the trick for me:

rar x file.rar

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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