Formal:
* Il y a longtemps: This is the most literal and formal translation.
* Cela fait longtemps: This is slightly less formal and means "It's been a long time."
Informal:
* Ça fait longtemps: This is the most common and informal way to say "It's been a long time."
* On ne s'est pas vus depuis longtemps: This means "We haven't seen each other in a long time."
You can also add a specific time frame to any of these phrases:
* Il y a longtemps que je ne t'ai pas vu. (It's been a long time since I last saw you.)
* Ça fait longtemps qu'on ne s'est pas parlé. (It's been a long time since we last spoke.)
* On ne s'est pas vus depuis des années. (We haven't seen each other for years.)
The best way to choose the right phrase depends on the situation and your relationship with the person you are talking to.