1

I'm getting the following error when trying to import osm data using osm2pgsql. I just installed pgAdmin4 today so it should all be up to date.

osm2pgsql version 0.92.0 (64 bit id space)

pgAdmin4 version 6.7

osm2pgsql -c -d osm -U postgres -H localhost -S C:\osm2pgsql-latest-x64\osm2pgsql-bin\default.style us-latest.osm.pbf

Osm2pgsql failed due to ERROR: Connection to database failed: authentication method 10 not supported

0

1 Answer 1

2

You are using a fairly old version of osm2pgsql, which includes an even older version of libpq (like v 9.6). This version does not allow connecting to a postgres instance (PG10+) configured with the now standard scram-sha authentication method (how your password is hashed and saved).

So you have 3 options:

  1. download a newer version of osm2pgsql (v1.6 at time of writing, which comes with libpq v12)
  2. Reconfigure your database to use MD5 instead of scram-sha (Do the opposite of this post)
  3. Find a libpq for PG10 and replace the one in the osm2pgsql-bin folder (there are breaking changes after v10)
1
  • Curses! The env variables were pointing me to an old version in Osmosium. I had downloaded the latest version but didn't do the math on the version number when I looked at it. It's working now. Thank you.
    – brink
    Apr 29, 2022 at 17:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.