I'm trying to install PostGIS on Ubuntu 17.04 and I've been following this guide to the point. Everything works perfectly, but when work my way down to install ogr_fdw foreign data wrapper for spatial data and run make && make install I run into this assembler error.

Assembler messages:
Fatal error: can't create ogr_fdw.o: Permission denied
<builtin>: recipe for target 'ogr_fdw.o' failed
make: *** [ogr_fdw.o] Error 1

Can anyone help?

  • you need sudo for the install sudo make install – ravery Jul 11 '17 at 9:30

The instructions you linked unnecessarily prepend the git clone command with sudo

sudo git clone -b master https://github.com/pramsey/pgsql-ogr-fdw.git pgsql_ogr_fdw

This causes the whole cloned directory tree to be owned by root, preventing the compiler from writing files there when run as a normal user.

I suggest you start over, removing the cloned directory

sudo rm -rf pgsql_ogr_fdw

and then start over without sudo

git clone -b master https://github.com/pramsey/pgsql-ogr-fdw.git pgsql_ogr_fdw
  • I still get the failure after that step is taken... – DPSSpatial Oct 9 '17 at 22:43

Same problem. Honestly, just use sudo -s to swith to root and then it would work perfectly (did for me).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.