Magento – getting error: Class Magento\Indexer\Model\ResourceModel\Indexer\State\CollectionFactory does not exist

clierrormagento2

When i run command for indexing

php bin/magento indexer:info

Error was thrown

Class Magento\Indexer\Model\ResourceModel\Indexer\State\CollectionFactory does not exist

[Magento\Framework\Exception\LocalizedException] Can't create
directory /var/www/html/var/generation/Magento/Indexer/Model/R
esourceModel/Indexer/State/.

I'm using magento 2.0.4, Linux server

Best Answer

composer update and 

Please add permission.