Instructions on how to install the unrar command on macOS from source.
macOS Command Line Tools need to be installed on your local computer.
To install the Command Line Tools run the following command:
xcode-select --installTo obtain the GNU Tar tool source code run the following commands:
mkdir -p ~/.src/unrar
curl --silent --location --retry 3 "https://www.rarlab.com/rar/unrarsrc-7.1.6.tar.gz" | tar xz --no-same-owner --strip-components=1 -C ~/.src/unrar
cd ~/.src/unrarNo configuration required.
To build the source code run the following command:
make --silent --no-print-directory -f makefile unrarTo install the tool run the following commands:
sudo install -v -m 0755 unrar /usr/local/binRun the following command on a terminal window:
unrarFirst clean the previous build objects using the following command:
rm -f *.oTo build the libraries run the following command:
make --silent --no-print-directory -f makefile libTo install the libraries run the following command:
mv libunrar.so libunrar.dylib
sudo install -v libunrar.* /usr/local/libAfter installing the tool you can remove the downloaded source code using the following commands:
cd ~
rm -rf ~/.src