I'm following the guide. Reached the point of installing carto. after what appears to be a successful install, I isssue carto -v which returns:
However if I invoke carto using sudo, it works fine. I can get by using sudo carto to convert project.mml to mapnik.xml. I'm just wondering what I did wrong! asked 27 Feb '21, 11:47 G3YAC edited 27 Feb '21, 12:30 SomeoneElse ♦ |
One Answer:
I'm guessing here, but if something works when run from root but not from a regular user I'm guessing that you did something from root that shouldn't have been done from root? I'd start by checking project.mml and the rest of the OSM Carto style that you cloned from github. answered 27 Feb '21, 12:32 SomeoneElse ♦ |
THANKS - It fails with carto -v which is before I try to use project.xml
There's nothing obvious earlier in the chain of setup operations.
Good point. Was there anything different to https://switch2osm.org/serving-tiles/manually-building-a-tile-server-20-04-lts/ that you did early on that might cause it? It's not something silly like "disk full" is it? The relevant lines:
just use Ubuntu's standard npm, and were working just fine the last time I tested it (a couple of months ago)
The error message points to a too-old version of carto. Type the command
which carto
as root and as non-root user; my hunch is that you might have installed a new version of carto with "npm install carto" as well as an older version from the Ubuntu distribution with "apt install carto" and that when root you run the correct version and when not root you run the too-old version.I think it is something silly - but not disc full. I found that there was a directory oddity: ~/src/openstreetmap-carto/openstreetmap.carto.
I must have done something stupid when copy/pasting. I just repeated the instructions from 'install mod tile and rendered'. Carto then returned version number as expected without needing sudo. It also processes project.mml to mapnik.xml without sudo but with lots of warnings about style/...not matching layer selector. I'll see what happens next but it is tempting to wipe the VM I'm using and have a fresh start. Thanks for your help.