Can't download Avast?

I was downloading Avast and then this popped up. “An error 5 has occured last performed option was: spawning” The name of the pop up was “Setup Selfextract”

Hi, welcome to the forum.
What is your OS, please, and what AV do you have currently installed?

I recommend a full install from scratch.
In general terms, it is best to download the files you will need (listed below) then disconnect from the internet, then uninstall the old AV and install the new one (including any reboots prompted) before re-connecting to get updates.

The files are
-Avast Uninstall Utility.
-Full installer file,36.99Mb (see picture below)
-The uninstall file for whatever AV you have previously used (including any that may have been previously removed.)

Save all these to your desktop.
-Disconnect from the net
-Uninstall the previous AV using “add/remove programs” (or programs and settings in Vista) from the control panel. Reboot if prompted.
-Run the appropriate uninstaller, also run the Avast uninstall utility. Reboot.
-Install Avast from the installer file downloaded. It will prompt for a boot scan. (Recommended if you have any malware symptoms. Might take an hour or more.)
-Reconnect to the net, update your Avast installation.

At some stage you will need to register it to keep receiving updates. The registration is free, safe, and straightforward. Go to the page you got the setup file from, and click “Register here.” Fill out the form, and keep an eye on emails on the address you used.
Enjoy.

I didn’t have to try that solution, I was able to download it. Thanks.

OK, what was the last AV you had? It will still need to be removed.