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.0009412280{main}( ).../index.php:0
20.09374262296Joomla\CMS\Application\SiteApplication->execute( ).../index.php:49
30.09374262296Joomla\CMS\Application\SiteApplication->doExecute( ).../CMSApplication.php:196
40.482111453216Joomla\CMS\Application\SiteApplication->dispatch( ).../SiteApplication.php:233
50.483011477592Joomla\CMS\Component\ComponentHelper::renderComponent( ).../SiteApplication.php:194
60.484311532920Joomla\CMS\Component\ComponentHelper::executeComponent( ).../ComponentHelper.php:377
70.484711560320require_once( '/var/www/vhosts/shan.info/httpdocs/components/com_k2/k2.php' ).../ComponentHelper.php:402
80.497011959952K2ControllerItem->execute( ).../k2.php:64
90.497011959952K2ControllerItem->display( ).../BaseController.php:710
100.511712610656K2ControllerItem->display( ).../item.php:78
110.511712610656K2ControllerItem->display( ).../controller.php:19
120.518212981696Joomla\CMS\Cache\Controller\ViewController->get( ).../BaseController.php:663
130.520913002064K2ViewItem->display( ).../ViewController.php:102
140.643015831880K2ViewItem->display( ).../view.html.php:742
150.643015831880K2ViewItem->loadTemplate( ).../HtmlView.php:230
160.647416004816include( '/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.0009412280{main}( ).../index.php:0
20.09374262296Joomla\CMS\Application\SiteApplication->execute( ).../index.php:49
30.09374262296Joomla\CMS\Application\SiteApplication->doExecute( ).../CMSApplication.php:196
40.482111453216Joomla\CMS\Application\SiteApplication->dispatch( ).../SiteApplication.php:233
50.483011477592Joomla\CMS\Component\ComponentHelper::renderComponent( ).../SiteApplication.php:194
60.484311532920Joomla\CMS\Component\ComponentHelper::executeComponent( ).../ComponentHelper.php:377
70.484711560320require_once( '/var/www/vhosts/shan.info/httpdocs/components/com_k2/k2.php' ).../ComponentHelper.php:402
80.497011959952K2ControllerItem->execute( ).../k2.php:64
90.497011959952K2ControllerItem->display( ).../BaseController.php:710
100.511712610656K2ControllerItem->display( ).../item.php:78
110.511712610656K2ControllerItem->display( ).../controller.php:19
120.518212981696Joomla\CMS\Cache\Controller\ViewController->get( ).../BaseController.php:663
130.520913002064K2ViewItem->display( ).../ViewController.php:102
140.643015831880K2ViewItem->display( ).../view.html.php:742
150.643015831880K2ViewItem->loadTemplate( ).../HtmlView.php:230
160.647416004816include( '/var/www/vhosts/shan.info/httpdocs/templates/gk_publisher/html/com_k2/templates/default/item.php' ).../HtmlView.php:701
back to top