Bug#1053458: openstreetmap-carto-common: Configure step failed with FATAL: role "root" does not exist

Nicolas Peugnet nicolas at club1.fr
Wed Oct 4 13:59:13 BST 2023


Package: openstreetmap-carto-common
Version: 5.7.0-1
Severity: important

Dear Maintainer,

When installing openstreetmap-carto-common package (as a dependency of
openstreetmap-carto), the configure step failed after having answered
yes to all the questions (as I remember: "do you want to download the
additionnal resources?" and "What is the name of the database? gis").

Here is the error message from apt install:

Setting up openstreetmap-carto-common (5.7.0-1) ...
INFO:root:Starting load of external data into database
Traceback (most recent call last):
  File "/usr/share/openstreetmap-carto-common/./get-external-data.py", line 405, in <module>
    main()
  File "/usr/share/openstreetmap-carto-common/./get-external-data.py", line 305, in main
    conn = psycopg2.connect(database=database,
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/psycopg2/__init__.py", line 122, in connect
    conn = _connect(dsn, connection_factory=connection_factory, **kwasync)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
psycopg2.OperationalError: connection to server on socket "/var/run/postgresql/.s.PGSQL.5432" failed: FATAL:  role "root" does not exist

dpkg: error processing package openstreetmap-carto-common (--configure):
 installed openstreetmap-carto-common package post-installation script subprocess returned error exit status 1
dpkg: dependency problems prevent configuration of openstreetmap-carto:
 openstreetmap-carto depends on openstreetmap-carto-common; however:
  Package openstreetmap-carto-common is not configured yet.

dpkg: error processing package openstreetmap-carto (--configure):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 openstreetmap-carto-common
 openstreetmap-carto
E: Sub-process /usr/bin/dpkg returned an error code (1)


It seems indeed that by default the root user does not have access to
PostgreSQL databases, and only postgres user has superuser privileges.
So maybe this script should be run as postgres user.

I'd like to mention that I tried to install this package on an almost
completely fresh install of Debian 12. I followed this tutorial until
the end [1] before noticing that the openstreetmap-carto package was
part of Debian. But I donc think that it was the source of the issue.

[1] https://switch2osm.org/serving-tiles/manually-building-a-tile-server-debian-12/

-- System Information:
Debian Release: 12.1
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'stable-security'), (500, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 6.1.0-12-amd64 (SMP w/4 CPU threads; PREEMPT)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages openstreetmap-carto-common depends on:
ii  curl                   7.88.1-10+deb12u1
ii  debconf [debconf-2.0]  1.5.82
ii  fonts-dejavu-core      2.37-6
pn  fonts-noto-cjk         <none>
pn  fonts-noto-hinted      <none>
pn  fonts-noto-unhinted    <none>
pn  fonts-unifont          <none>
ii  gdal-bin               3.6.2+dfsg-1+b2
ii  mapnik-utils           3.1.0+ds-3+b1
ii  python3                3.11.2-1+b1
ii  unzip                  6.0-28

openstreetmap-carto-common recommends no packages.

openstreetmap-carto-common suggests no packages.



More information about the Pkg-grass-devel mailing list