htc m7 can't update it to lollipop
Did you root your phone or have you installed custom recovery and such on it? Like the notification says, it throws such errors when the phone is detected to have been modified.

If you really haven't touched the phone in aforementioned ways, then you might have to resort to manually upgrading by using OTA zips, which has some prerequisites and is more complicated to do.