How can I find shp2pgsql?

12,517

Solution 1

I'm pretty sure you need PostGIS installed - its part of that package. You can install it from that site, or its likely that Debian's package manager even has it. Where it ends up depends on package builder.

Actually finding it, if its not in your PATH after you install PostGIS, is probably easiest done through locate shp2pgsql although you may need to updatedb first.

Additionally, you can find your Postgres relevant directories by running pg_config .

Solution 2

The first argument to find is the path from which to search. ~ is your home directory. Your command searches shp2pgsql from your home directory, not in the bin directory. With find, user command find /usr/lib/postgresql/ -name shp2pgsql.

If your system has locate installed, you could also locate shp2pgsql.

Share:
12,517
AP257
Author by

AP257

Updated on June 04, 2022

Comments

  • AP257
    AP257 almost 2 years

    I'm working on a Debian machine with postgresql installed. I need to find shp2pgsql (a utility that converts shapefiles into SQL, as the name suggests).

    I've seem suggestions that it's located in the bin directory of postgresql, however I don't know where to find this. I can't locate shp2pgsql through a simple find (probably much too simple, since my Unix skills are not that good):

    $ find ~ -name 'shp2pgsql' -print
    $ 
    

    Any suggestions?

    Thanks - apologies for the basic question!