There are many ways to use the verb "know" to fill in the blank above in a grammatically correct way.
First, you could use one of the many varieties of past tense that exist in the English language.
I knew him for a long time would be the simplest and most direct way to use the past tense of "know" in the sentence. I have known him for a long time conveys the same idea. I had known him is the past perfect tense and indicates that you once knew him but no longer do. I would know him for a long time is the conditional tense and indicates that for some reason (condition) you continued to be acquainted with this person.
Whatever you do, you want to avoid the present tense "know," as the words "long time" suggest the passage of time and do not indicate only the present moment.
Tense is important and vexing in the English language because of the various nuances the different tenses carry. Reading as much as possible is probably the best way to become familiar with how tense operates in the language. I teach advanced grammar, and the verb, which is how tense is conveyed, is the most important part of speech in English: a verb carries a sentence, and if you are diagramming sentences, it is the only part of the sentence that always appears on the base line. Therefore, it is important to master its uses to become fluent in English.