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) + 黎 (lí, dawn) + 波 (bō, wave) + 里 (lǐ, inside): a pure phonetic transliteration. Don't try to read meaning into the characters — sound them out: dí-lí-bō-lǐ ≈ Tri-po-li.