Keka icon indicating copy to clipboard operation
Keka copied to clipboard

Unable to create .rar files

Open geomikev opened this issue 11 months ago • 24 comments

Configuration

  • Keka version: 1.4.6 (5542)
  • macOS version: 15.2 (build 24c101)

I am following the instructions on this webpage (https://github.com/aonez/Keka/wiki/Rar-compression) to try to create rar files and I am having no luck. I have installed both Keka and rar using Homebrew and have un-sandboxed Keka but I still am not giving an option to create a rar file from the drop down menu of file types (ie 7z, zip, tar). I have also manually downloaded the rar program and tried to copy it into /bin/rar or /usr/local/bin/rar or ~/bin/rar and I keep getting told it is a directory and I don't have permission to copy directories.

Any help would be looked upon kindly

Mike

geomikev avatar Jan 08 '25 02:01 geomikev

@geomikev since your issue is copying the rar binary, you can manually create the bin folder in your user folder, or do it using the Terminal like mkdir ~/bin. Then manually copy the rar binary to that folder. That should work for you.

Otherwise I suggest you use brew if you're not familiar with the Terminal to install it. Just install brew and then do a brew install rar.

aonez avatar Jan 09 '25 10:01 aonez

Hello,

I followed your steps and I am still not given a rar option in the drop down menu. I Tried it both manually and using Homebrew. I also used Homebrew to install Keka as well. Any other suggestions?

Mik

On Thu, Jan 9, 2025 at 5:11 AM aONe @.***> wrote:

@geomikev https://github.com/geomikev since your issue is copying the rar binary, you can manually create the bin folder in your user folder, or do it using the Terminal like mkdir ~/bin. Then manually copy the rar binary to that folder. That should work for you.

Otherwise I suggest you use brew https://brew.sh if you're not familiar with the Terminal to install it. Just install brew and then do a brew install rar.

— Reply to this email directly, view it on GitHub https://github.com/aonez/Keka/issues/1576#issuecomment-2579682624, or unsubscribe https://github.com/notifications/unsubscribe-auth/BOJPONYWWPFUHL3GDCMQQZT2JZDNXAVCNFSM6AAAAABUY6QTLWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKNZZGY4DENRSGQ . You are receiving this because you were mentioned.Message ID: @.***>

geomikev avatar Jan 09 '25 19:01 geomikev

Sorry for the late reply. Did you solved this issue?

aonez avatar Feb 06 '25 09:02 aonez

Hello .

I am sorry to say it did not work.

Mike

On Thu, Feb 6, 2025 at 4:05 AM aONe @.***> wrote:

Sorry for the late reply. Did you solved this issue?

— Reply to this email directly, view it on GitHub https://github.com/aonez/Keka/issues/1576#issuecomment-2639218000, or unsubscribe https://github.com/notifications/unsubscribe-auth/BOJPON64RGRHCQ7VAX5D7SD2OMQWXAVCNFSM6AAAAABUY6QTLWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDMMZZGIYTQMBQGA . You are receiving this because you were mentioned.Message ID: @.***>

geomikev avatar Feb 06 '25 09:02 geomikev

Do you want to troubleshoot it?

aonez avatar Feb 06 '25 09:02 aonez

Sure. Please give me instructions

On Thu, Feb 6, 2025 at 4:28 AM aONe @.***> wrote:

Do you want to troubleshoot it?

— Reply to this email directly, view it on GitHub https://github.com/aonez/Keka/issues/1576#issuecomment-2639266941, or unsubscribe https://github.com/notifications/unsubscribe-auth/BOJPON55WBY7WW5ABYX3AZT2OMTNBAVCNFSM6AAAAABUY6QTLWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDMMZZGI3DMOJUGE . You are receiving this because you were mentioned.Message ID: @.***>

geomikev avatar Feb 06 '25 10:02 geomikev

First lets check if you have the RAR binary where Keka can use it. Write this in the Terminal.app:

file /bin/rar /usr/local/bin/rar ~/bin/rar

You should see at least one of them with "Mach-O executable...". Let me know what this command outputs.

Also you can check if Keka is unsandboxed with this code (replace the path if you have Keka elsewhere):

spctl -a -vv -t execute /Applications/Keka.app

This should return "rejected". If it return "accepted" and a signature, it is not unsandboxed and you should unsandbox it again.

aonez avatar Feb 07 '25 10:02 aonez

Hi, it's been a while but I stumbled across this issue and managed to reproduce your problem. It seems that Keka, contrary to the wiki article, does not see rar in ~/bin/rar. Do this instead:

Unsadbox Keka: codesign --force --deep --sign - /Applications/Keka.app

Install rar via Homebrew: brew install --cask rar

Create a symbollic link to /usr/local/bin/ - this way, when brew updates the rar binary, the link will also point to the new version: sudo ln -s /opt/homebrew/bin/rar /usr/local/bin/rar

rar needs to be run at least once to whitelist it for Gatekeeper in Settings > Privacy and security

You should now see rar in the dropdown.

Tested on Keka 1.4.8 installed via homebrew.

matgaj avatar Apr 26 '25 21:04 matgaj

I had the same issue and I fixed it with your steps. Thanks!

Valeriucoding avatar May 19 '25 05:05 Valeriucoding

Thanks @matgaj. I've added the brew path /opt/homebrew/bin/rar for the next version of Keka. Also updated the Wiki with that updated path and the security issue.

On Intel machines brew installs its binaries on /usr/local/bin but on AppleSilicon they go to /opt/homebrew/bin.

aonez avatar May 19 '25 08:05 aonez

Frankly, I'm still having trouble, too. I don't see any .rar options in Keka, even after following the steps listed. I have High Sierra and Keka 1.5.2. Any new suggestions you have would be helpful. Thanks.

Kamyl68 avatar Aug 08 '25 06:08 Kamyl68

@Kamyl68 did all steps of the process go as expected? https://github.com/aonez/Keka/issues/1576#issuecomment-2832628879

Details: https://github.com/aonez/Keka/wiki/Rar-compression

gingerbeardman avatar Aug 08 '25 11:08 gingerbeardman

Hi, I've already seen the page you mentioned. I've tried every option available online.

Kamyl68 avatar Aug 08 '25 12:08 Kamyl68

The rar binary is currently in usr/local/bin. Maybe that's why Keka isn't seeing it. Should I create a different path? Perhaps opt/homebrew/bin? It's also true that I'm not very familiar with this.

Kamyl68 avatar Aug 08 '25 12:08 Kamyl68

As previously mentioned, homebrew puts stuff in different places on Intel and Apple Silicon but Keka knows this, so /usr/local/bin should be fine... A lot has changed since High Sierra - this might just be a case of binaries no longer working correctly on that system.

matgaj avatar Aug 08 '25 12:08 matgaj

I definitely think so. Also because I've tried all the options available online, as I said. Maybe, as you said, some old RAR binaries might work.

Kamyl68 avatar Aug 08 '25 13:08 Kamyl68

@Kamyl68 try executing your RAR binary in the Terminal, maybe that brings some light.

aonez avatar Aug 08 '25 14:08 aonez

How can I do this from the terminal? Just type rar?

Kamyl68 avatar Aug 08 '25 14:08 Kamyl68

If it’s on your PATH, which if you installed it via homebrew it should be. Try rar --help to check the syntax and compress like a text file and see if it works at all.

matgaj avatar Aug 08 '25 15:08 matgaj

When I run rar --help from the terminal I get an error...

Kamyl68 avatar Aug 09 '25 15:08 Kamyl68

What error precisely? If it says „command not found” that means rar isn’t in your PATH and you need to run the file directly by going to its directory and executing ./rar instead of just rar. If it’s something else, it could be that that version of rar no longer works on that version of macOS and the problem isn’t with Keka at all.

matgaj avatar Aug 09 '25 15:08 matgaj

I'm posting all three attempts I made. then the situation is as follows:

  1. rar --help = ERROR: Unknown option: -help

  2. ./rar = -bash: ./rar: No such file or directory

  3. rar = RAR 7.12 Copyright (c) 1993-2025 Alexander Roshal 23 Jun 2025 Trial version Type 'rar -?' for help

Usage: rar -<switch 1> -<switch N> <files...> <@listfiles...> <path_to_extract/>

Kamyl68 avatar Aug 09 '25 16:08 Kamyl68

Ah, my bad - looks like rar doesn’t use the Unix convention for displaying help (--help). But it looks like the binary runs and is on you path. Consult the -? syntax help and try compressing a file

matgaj avatar Aug 09 '25 17:08 matgaj

Hi, I finally managed to partially resolve the issue. Keka remains impenetrable. However, I created context menus for creating and extracting RAR files without using Keka. I followed this tutorial, which was very helpful. https://apple.stackexchange.com/questions/389384/how-to-make-macos-archive-rar-and-unrar-files-in-finder-with-automator-and-shell

Kamyl68 avatar Aug 11 '25 05:08 Kamyl68