If you have two Postgresql
installation on your ubuntu such as 9.1
and 9.3
Before running the version specific installation, you may need to add the correct postgres repo using their instructions which I'm paraphrasing below in case they disappear:
deb http://apt.postgresql.org/pub/repos/apt/ UBUNTU_VERSION_NAME-pgdg main
sudo apt-get install wget ca-certificates
wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -
apt-get update
(UBUNTU_VERSION_NAME should be replaced by trusty or whatever your version name is)
then you can use commands below to install the hstore
extension on each server separately:
Postgresql 9.1:
sudo apt-get install postgresql-contrib-9.1
Postgresql 9.3:
sudo apt-get install postgresql-contrib