So how come, you may ask, that the largest city in (Arabic-speaking) Syria is called Aleppo, while both in Syria and in Libya there are cities called Tripoli? How can the locals pronounce these names?
The answer, of course, is that these are not the Arabic names of the places in question.
The Arabic name of Aleppo is حلب Ḥalab ˈħalab, with the expected b rather than p. Aleppo is the Italian name.
Tripoli, likewise, is Italian, namely the Italian version of the Greek Τρίπολις Trípolis ‘three cities’. The Arabic name is طرابلس Ṭarābulus, which in Libyan Arabic gets reduced to tˁraːbləs. Again, no p. Simples!