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

Hello, I need some help
I can’t install plugins from gallery
When I press OK nothing happens, When I reload the page this message appears
The tar command is not available. Please correctly configure it in your “config.inc.php”.
Localhost
Windows 10 64x
XAMPP x64-7.2.21-2-VC15
OJS 3.1.2.1
PHP version: 7.2.21

  • Apache/2.4.39 (Win64) OpenSSL/1.1.1c PHP/7.2.21
  • Database client version: libmysql - mysqlnd 5.0.12-dev - 20150407 - $Id:

Hi @Younes_SAAID

In order to be able to install plugins from the plugin gallery directly, you need to install the “tar” command on your server. It’s a utility that unpacks archives, sort of like unzip. I’m not really sure what that will look like on a Windows server though.

If you want, you can also install plugins by downloading the archive directly to your PC, unpacking it there, and then FTPing it up to your server, in the correct plugins/ subdirectory. Then you can install it via the plugin grid.

Cheers,
Jason

1 Like

Php errour
Stack trace:
#0 C:\xampp\htdocs\ojs\lib\pkp\controllers\grid\plugins\PluginGalleryGridHandler.inc.php(270): PluginHelper->upgradePlugin(‘importexport’, ‘quickSubmit’, NULL, ‘The tar command…’)
#1 C:\xampp\htdocs\ojs\lib\pkp\controllers\grid\plugins\PluginGalleryGridHandler.inc.php(236): PluginGalleryGridHandler->installPlugin(Array, Object(Request), true)
#2 C:\xampp\htdocs\ojs\lib\pkp\classes\core\PKPRouter.inc.php(390): PluginGalleryGridHandler->upgradePlugin(Array, Object(Request))
#3 C:\xampp\htdocs\ojs\lib\pkp\classes\core\PKPComponentRouter.inc.php(257): PKPRouter->_authorizeInitializeAndCallRequest(Array, Object(Request), Array)
#4 C:\xampp\htdocs\ojs\lib\pkp\classes\core\Dispatcher.inc.php(134): PKPComponentRouter->route(Object(Request))
#5 C:\xampp\htdocs\ojs\lib\pkp\classes\core\PKPApplication.inc.php(252): Dispatcher->dispatch(Object(Request))
#6 C:\xampp\ht in C:\xampp\htdocs\ojs\lib\pkp\classes\plugins\PluginHelper.inc.php on line 206
[19-Aug-2019 14:06:38 Europe/Berlin] PHP Fatal error: Uncaught Error: Call to a member function getProductType() on string in C:\xampp\htdocs\ojs\lib\pkp\classes\plugins\PluginHelper.inc.php:206

Hi @Younes_SAAID

Did this error happen after you got the tar command correctly configured? how did you generate the error?

Cheers,

No. thats the issue. the error after clicking on OK to install .
I believe that the problem is on tar command
i dont know how to correct configuration of the tar command.
im new at this … tell me how i will try thanks
OJS 3.1.2.1
Localhost XAMPP Windows 10 64x

I see from your other post that you installed 7zip. While that may work on tar archives, it’s not the tar command that OJS needs. Try:

http://gnuwin32.sourceforge.net/packages/gtar.htm

and be sure to update your config.inc.php file with the full path to the command

Cheers,

@jnugent how to set up config.inc.php file with the path? I downloaded the tar for windows but how you set up it Can you explain me please

See also: