Geographic Information Systems Asked on December 26, 2020
After upgrading my GDAL version to 3.1.4, I am unable to upload shapefiles to a local postgres database by using ogr2ogr. PostGIS is already installed and I am able to connect and run queries successfully on PGAdmin. However, I am no longer able to upload shapefiles through the terminal.
The following command used to work:
ogr2ogr -f "PostgreSQL" PG:"host=localhost password=password dbname=postgres port
=5432" USA_counties.shp -nln usa_counties
But now the following errors are thrown when I run it:
ERROR 1: ERROR: could not load library "/usr/local/lib/postgresql/postgis-3.so": dlopen(/usr/local/lib/postgresql/postgis-3.so, 10): Symbol not found: _hash_bytes
Referenced from: /usr/local/lib/postgresql/postgis-3.so
Expected in: /usr/local/opt/postgresql/bin/postgres
in /usr/local/lib/postgresql/postgis-3.so
ERROR 1: PROJ: proj_identify: Cannot find proj.db
ERROR 1: ERROR: could not load library "/usr/local/lib/postgresql/postgis-3.so": dlopen(/usr/local/lib/postgresql/postgis-3.so, 10): Symbol not found: _hash_bytes
Referenced from: /usr/local/lib/postgresql/postgis-3.so
Expected in: /usr/local/opt/postgresql/bin/postgres
in /usr/local/lib/postgresql/postgis-3.so
ERROR 1: ERROR: could not load library "/usr/local/lib/postgresql/postgis-3.so": dlopen(/usr/local/lib/postgresql/postgis-3.so, 10): Symbol not found: _hash_bytes
Referenced from: /usr/local/lib/postgresql/postgis-3.so
Expected in: /usr/local/opt/postgresql/bin/postgres
in /usr/local/lib/postgresql/postgis-3.so
ERROR 1: PROJ: proj_create_from_database: Cannot find proj.db
Any ideas as to what steps need to be taken to successfully load postgis-3.so
?
Edit:
When accessing
/usr/local/opt/postgresql/bin/postgres
in the terminal, the following message appears:
postgres does not know where to find the server configuration file. You must specify the --config-file or -D invocation option or set the PGDATA environment variable.
Get help from others!
Recent Questions
Recent Answers
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP