EDIT: Putting this at the top because not everyone is seeing what I actually need. I can unpack the rar archive just fine. What I can’t do (on arm) is add to/update the files in the rar archive. I have unrar already installed. What I can’t install is the rar package to create/update rar archives.
So I’ve been banging my head against the wall for about half an hour trying to install the rar package from the multiverse repository on an Ubuntu 23.10 vm I have running on my m1 mac mini. I finally ended up on https://pkgs.org and searched up rar to see if I could download it directly instead of using apt.
And it was there I realized there’s no arm version of rar.
Side note, any recommendations for an arm utility that handles rar files? I already have unrar-free installed, but what I need is something to update/add files to existing rar files.
Worst case scenario I unrar them and then repackage them with tar or zip, but if I can just work with the rar archive, I’d prefer that.
Edit: I got excited for a second remembering that I’ve got rar installed via homebrew on that same m1 mac, but when I tried to install homebrew in the vm, I learned that homebrew doesn’t officially support arm.
deleted by creator
Thank you!! I will try that!!
It can only do that with the unfree unrar plugin. Do not expect your distro to ship it by default due to that issue.
deleted by creator
Damn rat files…
I just opened a
nix-shell
withunrar
in it on aarch64-linux and am able to execute it, so yes, it can be made to work.deleted by creator
Offtopic, but why on earth would anyone use .rar? It’s a proprietary format. The reason there’s basically no software to create or modify .rar archives is due licensing, which makes it illegal to write software that can do it.
Looking at the rarlab’s website, it appears that only the MacOS version has an ARM build. For Linux, only x86 and x64 are listed.
So, either use MacOS, use emulation to run the x86/x64 version or break the law.
Can 7zip unrar? That’s my go-to form anything compression.
Yes, it can
unar is the free version and should be in Ubuntu
I’ve got unrar installed already, but what I want to be able to do is add/update files in the rar archives, which unrar can’t do.
Have you tried building it?
RAR isn’t open source.
the answer for “what can unpack this archive” is pretty much always: bsdtar from libarchive
edit: sorry, I can’t read. libarchive unfortunately can’t write RAR archives.
You could install qemu-user and register it in binfmt in the vm, that lets you run programs for other architectures.
As a last resort you could install docker from apt, build an image from a distro has rar in its arm repos, then run containers ephemerallly, mounting your work dir into the container where rar runs. Try the suggested methods of getting a binary first. 😅
docker run --rm -v /your/work/dir:/destination/in/container your_image rar ...