Not sure what you mean by "When I try to do this I got a message that there was a problem".
LR 6 you have to Buy. It is not an Update it is an Upgrade and cost money. Once you buy it you then install it on your computer. If LR 4 is still installed LR 6 will ask you to Sign In using an Adobe ID, Email address and password, which if you don't have you will need to create. Once you do that a window will come up asking you to input a valid serial number for LR 6 which you would of gotten either in an email to your Adobe ID account email address or it is on the box someplace if you bought the Boxed Retail version. Once you do that you are good to go.
If you don't still have LR 4 install the same things happens as above except once you enter the LR 6 serial, since it is for an Upgrade version, you will need to also enter the serial number for your copy of LR 4.
Now what problem are you having? Buying? Installing? Signing in? Or serial number problems?