In OSX you can do with:
./configure --with-python --with-uuid=e2fs --with-libxml
make && sudo make install
go to contrib folder in postgres source code and install plpython and uuid extensions (make install
as usual)
db.run('CREATE EXTENSION schema_triggers') unless db.fetch(%{
SELECT count(*) FROM pg_extension WHERE extname='schema_triggers'
}).first[:count] > 0
```
in this file https://github.com/CartoDB/cartodb/blob/70a9e9a4d4523b48054a9f7cefaf626fe7247019/app/models/user/db_service.rb#L140-L142
### remove schema_triggers dependency from cartodb extension
```
cd lib/sql
#edit cartodb.control.in and remove schema_triggers from dependencies
# make sure pg_config points to the 9.6 installation
make && sudo make install
```
Everything else is the same, you can follow all the steps in cartodb install doc http://cartodb.readthedocs.org/en/latest/install.html