(Resolved) The tar command is not available. Please configure it correctly in your "config.inc.php"

I am running the latest version of OJS 3.1.2.1 by MAMP, I am trying to install plugins, but when trying to install something there is no item message installed and going into administration I get the following notification: The tar command is not available. Please configure it correctly in your “config.inc.php”.

Macbook Pro - macOS Mojave (10.14.5)
MAMP
PHP: 7.3.1
MySql: 5.7.25

I thank you all for your help and collaboration.

1 Like

In your terminal, type which tar or whereis tar. Then use the path it returns in config.inc.php:

I don’t understand how to do this, should I put the file location on this line?
Example: Macintosh HD⁩/⁨Aplicativos⁩/MAMP/⁨htdocs⁩

In your OJS document root, which is probably MAMP/⁨htdocs⁩, you will find a file ‘config.inc.php’. There is a line which starts with tar =. This line needs to reflect the path to the tar executable.

I’m not familiar with where the tar command lives on Mac OSX. If you are able to run the Terminal application, you can type in a command to find the tar command, either which or whereis. For example, you might see something like:

$ which tar
/usr/bin/tar

In this case, you would change the line in config.inc.php to:

tar = /usr/bin/tar
3 Likes

great, solved the problem with this.

Hello everyone,

I know this is an already closed question but I’m running OJS on a Windows local machine and none of this suggestion worked for me.

I found a way to solve it on my Windows machine and thought it useful to share with anyone who may run into the same problem in the future using the same platform.

Run the “where tar” command in your command prompt. This will show where tar is located on your windows machine and then you can copy the part into your config file.

where tar
C:\Windows\System32\tar.exe

tar = C:\Windows\System32\tar.exe

This solved the problem for me and I believe it will be helpful for windows users.

This solution worked for me on local Windows 10 setup. Thank you!

1 Like