CentOS Linux: Fix bash: ntpdate: command not found centos

First you have to install ntp:

Run as root:

yum install ntp

Then if you run ntpdate again you might get the error again. You can run ntpdate with:

/usr/sbin/ntpdate 2.pool.ntp.org

Replace 2.pool.ntp.org with another server if that doesn’t work.

If you get a ntpdate[585863]: the NTP socket is in use, exiting Error, then run:

/etc/init.d/ntpd stop

Took me 10 precious minutes to update the time in a server … That’s a lot!

Last modified onSaturday, 05 January 2013 12:50

( ! ) Warning: count(): Parameter must be an array or an object that implements Countable in /var/www/vhosts/shan.info/httpdocs/templates/gk_publisher/html/com_k2/templates/default/item.php on line 169
Call Stack
#TimeMemoryFunctionLocation
10.0008413240{main}( ).../index.php:0
20.08974263256Joomla\CMS\Application\SiteApplication->execute( ).../index.php:49
30.08974263256Joomla\CMS\Application\SiteApplication->doExecute( ).../CMSApplication.php:196
40.332011454256Joomla\CMS\Application\SiteApplication->dispatch( ).../SiteApplication.php:233
50.332811478632Joomla\CMS\Component\ComponentHelper::renderComponent( ).../SiteApplication.php:194
60.333511533960Joomla\CMS\Component\ComponentHelper::executeComponent( ).../ComponentHelper.php:377
70.333711561360require_once( '/var/www/vhosts/shan.info/httpdocs/components/com_k2/k2.php' ).../ComponentHelper.php:402
80.341611960992K2ControllerItem->execute( ).../k2.php:64
90.341611960992K2ControllerItem->display( ).../BaseController.php:710
100.350812611696K2ControllerItem->display( ).../item.php:78
110.350812611696K2ControllerItem->display( ).../controller.php:19
120.355112982736Joomla\CMS\Cache\Controller\ViewController->get( ).../BaseController.php:663
130.359213003104K2ViewItem->display( ).../ViewController.php:102
140.443015832920K2ViewItem->display( ).../view.html.php:742
150.443015832920K2ViewItem->loadTemplate( ).../HtmlView.php:230
160.446116005856include( '/var/www/vhosts/shan.info/httpdocs/templates/gk_publisher/html/com_k2/templates/default/item.php' ).../HtmlView.php:701

( ! ) Notice: Only variables should be assigned by reference in /var/www/vhosts/shan.info/httpdocs/templates/gk_publisher/html/com_k2/templates/default/item.php on line 478
Call Stack
#TimeMemoryFunctionLocation
10.0008413240{main}( ).../index.php:0
20.08974263256Joomla\CMS\Application\SiteApplication->execute( ).../index.php:49
30.08974263256Joomla\CMS\Application\SiteApplication->doExecute( ).../CMSApplication.php:196
40.332011454256Joomla\CMS\Application\SiteApplication->dispatch( ).../SiteApplication.php:233
50.332811478632Joomla\CMS\Component\ComponentHelper::renderComponent( ).../SiteApplication.php:194
60.333511533960Joomla\CMS\Component\ComponentHelper::executeComponent( ).../ComponentHelper.php:377
70.333711561360require_once( '/var/www/vhosts/shan.info/httpdocs/components/com_k2/k2.php' ).../ComponentHelper.php:402
80.341611960992K2ControllerItem->execute( ).../k2.php:64
90.341611960992K2ControllerItem->display( ).../BaseController.php:710
100.350812611696K2ControllerItem->display( ).../item.php:78
110.350812611696K2ControllerItem->display( ).../controller.php:19
120.355112982736Joomla\CMS\Cache\Controller\ViewController->get( ).../BaseController.php:663
130.359213003104K2ViewItem->display( ).../ViewController.php:102
140.443015832920K2ViewItem->display( ).../view.html.php:742
150.443015832920K2ViewItem->loadTemplate( ).../HtmlView.php:230
160.446116005856include( '/var/www/vhosts/shan.info/httpdocs/templates/gk_publisher/html/com_k2/templates/default/item.php' ).../HtmlView.php:701
back to top