Short answer: No.
Long answer: One of the things most commonly criticized about fiction of any medium, is whether or not the characters, most importantly the main characters, are likable. So, what does it mean for a character to be likable? Usually, it means the character is relatable, sympathetic, or even admirable. Audiences generally want to connect to the characters they’re reading about. Characters are the vehicle through which readers get to experience our world, and if you’re reading in first or deep third person point of view, that whole world is filtered through the character. It’s hard to stay in the head or life of someone you despise, so it is definitely easier to write a good book with a large appeal if your main characters are likable.
But it is not a requirement.
Enter, the anti-hero. The anti-hero is a protagonist who lacks traditional heroic (and often sympathetic) qualities. The anti-hero is also increasingly popular among audiences, to the point where even villains will gain popularity over easier-to-stomach heroes. Why is this? It’s because while they may not be likable, they still possess the key ingredient in a main character. They are compelling. Walter White, Cersei Lannister, Dr. Hannibal Lecter, these are not good people, but we love—or love to hate— because they’re interesting. Walter White had vaulting ambition, Cerci Lannister has sheer tenacity, and Dr. Lecter has a veneer of charm and polish over a darkly twisted psychosis. What’s more, if we make our heroes too heroic, we run the risk of having a protagonist who is sympathetic (we feel for them) but not empathetic (we feel with them). I don’t know what it’s like to have Captain America’s unwavering sense of justice, but I do know what it’s like to have Loki’s seething jealousy. (I’m not proud, but I’m human.) Sometimes we have a character who is so far removed from the average reader or viewer that they’re difficult to understand. We often see this with genius-characters like Sherlock, or Dr. Gregory House. The average reader or viewer is not a genius, so we end up with a character who is hard to empathize with, but is fascinating to observe.
All of these characters stray from the traditional likable protagonist (some of them are villains in their own right) but all of them have huge fan followings and immense popularity, because most of all, audiences want to be entertained. So go out there are write unlikable characters. Make them wicked. Make them flawed. Afflict them with genius and psychoses. Anything is forgivable, just don’t be boring.