Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I just had to install postgresql server on my machine so I did:

apt-cache search postgresql

and it listed a bunch of packages related to postgresql:

[...]
postgis - Geographic objects support for PostgreSQL -- common files
postgresql-8.4 - object-relational SQL database, version 8.4 server
postgresql-9.1-debversion - Debian version number type for PostgreSQL
postgresql-9.1-ip4r - IPv4 and IPv4 range index types for PostgreSQL 9.1
postgresql-9.1-orafce - Oracle support functions for PostgreSQL 9.1
[...]
postgresql-server-dev-8.4 - development files for PostgreSQL 8.4 server-side programming
postgresql-server-dev-all - extension build tool for multiple PostgreSQL versions
proftpd-mod-pgsql - Versatile, virtual-hosting FTP daemon - PostgreSQL module
ptop - PostgreSQL performance monitoring tool akin to top
[...]

However, the actual postgresql package wasn't listed although it exists.

$ apt-cache show postgresql
Package: postgresql
Priority: optional
Section: database
Installed-Size: 63
Maintainer: Martin Pitt <martin.pitt@ubuntu.com>
Original-Maintainer: Martin Pitt <mpitt@debian.org>
Architecture: all
Source: postgresql-common (129ubuntu1)
Version: 9.1+129ubuntu1
Depends: postgresql-9.1
Filename: pool/main/p/postgresql-common/postgresql_9.1+129ubuntu1_all.deb
Size: 5552
MD5sum: 0bee83a4dab3e1d236fb4de1abcbf5c2
SHA1: f58d51b7f855c10959078b6ed8c3ea22dd3293ac
SHA256: ec0a12dabb52fee21f8576d5bd0990df6827e551dcd9b24f950d3ca4564d2761
Description-en: object-relational SQL database (supported version)
 This metapackage always depends on the currently supported PostgreSQL
 database server version.
 .
 PostgreSQL is a fully featured object-relational database management
 system.  It supports a large part of the SQL standard and is designed
 to be extensible by users in many aspects.  Some of the features are:
 ACID transactions, foreign keys, views, sequences, subqueries,
 triggers, user-defined types and functions, outer joins, multiversion
 concurrency control.  Graphical user interfaces and bindings for many
 programming languages are available as well.
Description-md5: bdff2d6e5b2a1dd00e72b3ed8729d9ac
Bugs: https://bugs.launchpad.net/ubuntu/+filebug
Origin: Ubuntu
Supported: 5y
Task: postgresql-server

Package: postgresql
Priority: optional
Section: database
Installed-Size: 63
Maintainer: Martin Pitt <martin.pitt@ubuntu.com>
Original-Maintainer: Martin Pitt <mpitt@debian.org>
Architecture: all
Source: postgresql-common (129)
Version: 9.1+129
Depends: postgresql-9.1
Filename: pool/main/p/postgresql-common/postgresql_9.1+129_all.deb
Size: 5508
MD5sum: 1ea1455e036c0a058145f19c6e92ef3f
SHA1: 8e73a616a686ec1130dc01858ee07e7ce8eb1caa
SHA256: a21adb533516e79145d93d57279db69260e644d259c39bb06f7e17d26721ac4b
Description-en: object-relational SQL database (supported version)
 This metapackage always depends on the currently supported PostgreSQL
 database server version.
 .
 PostgreSQL is a fully featured object-relational database management
 system.  It supports a large part of the SQL standard and is designed
 to be extensible by users in many aspects.  Some of the features are:
 ACID transactions, foreign keys, views, sequences, subqueries,
 triggers, user-defined types and functions, outer joins, multiversion
 concurrency control.  Graphical user interfaces and bindings for many
 programming languages are available as well.
Description-md5: bdff2d6e5b2a1dd00e72b3ed8729d9ac
Bugs: https://bugs.launchpad.net/ubuntu/+filebug
Origin: Ubuntu
Supported: 5y
Task: postgresql-server

I was able to find it by Googling how to install postgresql on Ubuntu (apt-get install postgresql) but I am still wondering why it was not listed by apt-cache search.

share|improve this question
    
Its there on the 2nd line: postgresql-8.4 - object-relational SQL database, version 8.4 server. This is the main package. It contains the server binaries. –  hmayag May 26 '13 at 13:01
    
But why isn't the postgresql package listed? It is a valid package that will install correctly using apt-get install postgresql. I've updated the question with the output of apt-cache show postgresql to clarify the question. The description says it's a "metapackage"... Maybe that's why it's not listed by apt-cache? –  Olivier Lalonde May 26 '13 at 13:49

1 Answer 1

Ah the package was actually listed but I made the mistake to think that the search results were sorted alphabetically so I missed it. For some weird reason, it seems that some parts of the lists are ordered and others not.

apt-cache search --names-only postgresql helps cut down the results too.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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