Most probable you have enabled the requiretty setting in /etc/sudoers for root. As the update script is running from cron (thus with no tty) and uses sudo to run under the “avast” user, this will not work.