Q: ogr2ogr cannot import .osm.pbf file to PostGIS I'm trying to import a multipolygon layer from "colorado-latest.osm.pbf" into PostGIS. GDAL 2.4.2 has been installed in a Ubuntu system. However, whenever I'm trying to import the osm.pbf file, I get this error:
ogr2ogr -where "building LIKE'%'" -f "PostgreSQL" PG:"host=XXXXXX.us-west-2.rds.amazonaws.com port=5432 user='postgres' password='XXXXXX' dbname='postgres'" colorado_latest.osm.pbf multipolygons

FAILURE:
Unable to open datasource `colorado_latest.osm.pbf' with the following drivers.
  -> PCIDSK
  -> netCDF
  -> JP2OpenJPEG
  -> PDF
  -> MBTiles
  -> EEDA
  -> ESRI Shapefile
  -> Map.....
.........

The ogrinfo query also yield the same error:
ogrinfo -ro -geom=NO -sql "select * from multipolygons where osm_id = '253750'" colorado_latest.osm.pbf

FAILURE:
Unable to open datasource `colorado_latest.osm.pbf' with the following drivers.
  -> PCIDSK
  -> netCDF
  -> JP2OpenJPEG
  -> PDF
  -> MBTiles
  -> EEDA
  -> ESRI Shapefile
  -> Map.....
.........

I'm using GDAL 2.4.2 which supports osm.pbf. I have SQLite installed. ogrinfo --formats also gives a list of formats which contains OSM. I have checked the /usr/share/gdal/osmconf.ini file. Its the same as default. The PostGIS extensions are available in the database and previously I have imported shapefiles into the same.
What do I need to correct here?
