Gentoo Wiki


AVG 7.1 Free for Linux

Get the ebuild or install by hand (but older version)

AVG 7.1 is stable and fast antivirus for Windows, now for Linux. Compared to the free ClamAV its about 40 percent faster. It is good for securing e-mail gateways and file servers. This howto is devoted to the Free Edition, which is for home (non-commerical) purposes available free of charge. It's a desktop edition, it has nice GUI, on-demand and on-access scanner and free on-line update scheduler.

Download it from and convert the RPM package (the Mandriva one) to tarball.

# emerge rpm2targz
# rpm2targz avg71flm-r30-a0791.i386.rpm

If you don't have lib-compat emerged, now it's time to do so, otherwise avgscan will not find libstdc++:

# emerge lib-compat

Now determine the license number

# strings avg71flm-r30-a0791.i386.rpm | grep register

I have replaced the license with X characters. Ok, unpack the /opt directory from the generated tarball to /opt, unpack the /etc/avg.conf link and unpack the /usr/bin and /usr/sbin links. You can copy them to /usr/local if you prefer (you should do that). Now try to run avgscan -- it shoult output something like "you do not have a licence". Thats fine, lets install the license:

# /usr/bin/avgscan -register 70FREE-XX-XX-XX-XX-XXXXX-XXX-XXXX

The program is now licensed and should operate (you can check it out: avgscan /the/path/to/check). Now do some preparation.

# groupadd avg
# useradd -s /sbin/false -g avg avg
# touch /opt/grisoft/avg7/data/set_vers.cfg
# cp /opt/grisoft/avg7/data/set_vers.cfg /opt/grisoft/avg7/data/upd_vers.cfg
# /opt/grisoft/avggui/bin/

The last command will ask for your username and company, insert it. Now set the permissions to avg user and group.

# chown avg:avg -R /opt/grisoft

Now lets do the first non-diff upgrade of the program:

# sudo -u avg avgupdate -o -i

Please do not forget the -i flag or the AVG updater will crash. From this point, you can always update without -i flag (use it only if something will go wrong). I use this for my cron:

# sudo -u avg avgupdate -o

Feel free to configure the AVG system in the /etc/avg.conf. We are almost done. If you need on-access scanner, install dazuko:

# emerge dazuko
Warning: As of 2.6.24, LSM no longer has the option of being compiled as a module in the kernel. Dazuko requires it to be built as a module, and thus will fail on emerge. More information about dazuko and LSM becoming a static part of the kernel can be found here. --Craftyguy 20:28, 16 April 2008 (UTC)

You will need to unmask it. If you use Postfix on your desktop, you can also use amavisd-new for e-mail scanning. Please note that AVG Free Edition is ment only for non-commerical purposes and for one personal computer. You are not allowed to use it on the home or company e-mail gateway! Futher reading for installing it as an e-mail scanner is in the README file in the doc directory.

If you want to run the AVG daemon either for the dazuko or for the amavisd, use this quick hacked init script as /etc/init.d/avgd:

File: /etc/init.d/avgd

opts="${opts} reload"

depend() {
        need net
        need dazuko

start() {
        ebegin "Starting AVG daemon"
        start-stop-daemon --start --quiet --background \
        --chuid avg --exec /usr/local/bin/avgscan -- -d
        eend $?

stop() {
        ebegin "Stopping AVG daemon"
        start-stop-daemon --stop --name avgscan
        eend $?

reload() {
        ebegin "Reloading virus database"
        start-stop-daemon --stop --signal HUP --name avgscan
        eend $?

We are done. Enjoy, the Python GTK GUI can be run with

# avggui

The following is not by original author!


Sudo will not work! -
You most likely just don't have it installed. Simply

emerge app-admin/sudo

I get an error when I try to run avggui that states "No Module named pygtk" -
First thing you should check is that you do indeed have python and gtk.
A good next step if you've had multiple versions of Python is to try python-updater
Lastly, you may simply need to

emerge pygtk

Above init script complains about missing dazuko script -
It seems to me, that dazuko neither has an init script nor needs one, but has to be loaded as a module with

modprobe dazuko

Anyway, in the later versions from avg, which was avg71flm-r28-a0757.i386.rpm last weekend, there is an init script you can use

cp /opt/grisoft/avg7/etc/init.d/avgd.gentoo /etc/init.d/avgd

Good luck, and I hope this saves some poking around when errors arise. A big 'thank you' to the author
for this, as I wasn't so fond of clam!
~Angstycoder -

Retrieved from ""

Last modified: Mon, 04 Aug 2008 08:46:00 +0000 Hits: 24,462