0
pip install pyspatialite==2.6.2-spatialite.2.4.0-4

Fails on Ubuntu with the error:

__main__.HeaderNotFoundException: cannot find proj_api.h, bailing out

Doing

sudo apt-get install libproj-dev libgeos-3.4.2 libgeos-dev

turns this error into

/usr/bin/ld: cannot find -lgeos

How do I fix this?

Zags
  • 37,389
  • 14
  • 105
  • 140

1 Answers1

1
sudo apt-get install libgeos-3.4.2

reveals that libgeos-3.4.2 was "manually installed" on my Ubuntu instance. This is fixed by:

sudo apt-get purge libgeos-3.4.2
sudo apt-get install libgeos-3.4.2 libgeos-dev
sudo ln -s /usr/lib/libgeos-3.4.2.so /usr/lib/libgeos.so
sudo ln -s /usr/lib/libgeos-3.4.2.so /usr/lib/libgeos.so.1

(See Geos installation in non-standard location for why the last two lines are needed)

Community
  • 1
  • 1
Zags
  • 37,389
  • 14
  • 105
  • 140