Each time I try to install libreOffice 4.2 windows 8.1 gives error 1402
These types of errors are usually an indication that something is wrong with the Windows installation. This Microsoft Community Answers thread seems to indicate Error 1402 is a problem with the security settings in the registry. Try the options indicated there.