There's also a port city called Tripoli in northern Lebanon.
Tips
culture
Two famous cities share this name: Libya's capital on the Mediterranean and Lebanon's second-largest city. Both come from Greek Tripolis ("three cities"). News about Libya in Chinese media - civil war, Gaddafi era - almost always mentions 的黎波里.
memory
的 (de) + 黎 (dawn) + 波 (wave) + 里 (inside): a pure phonetic transliteration. Don't try to read meaning into the characters - sound them out: dí-lí-bō-lǐ ≈ Tri-po-li.