postgresql - Postgres failed to install, 'unexpected character ";"' -


so morning couldn't install postgres 9.1 ubuntu repo. tried installing 9.2 postgres repo, if failed same error. error trace uninformative (i don't know source of error). google didn't tell me well.

it failed during installation same error, , tried create cluster manually. but...

root@ubuntu-1304-raring-64-minimal /home/tmp # pg_createcluster 9.2 main --start creating new cluster (configuration: /etc/postgresql/9.2/main, data:                 /var/lib/postgresql/9.2/main)... fatal:  syntax error @ line 5067: unexpected character ";" child process exited exit code 1 initdb: removing contents of data directory "/var/lib/postgresql/9.2/main" error: initdb failed 

what wrong?

according output dpkg -l 'postgres*':

 ii  postgresql-9.2                               9.2.4-1.pgdg12.4+1          amd64                       object-relational sql database, version 9.2 server un  postgresql-client                                                                              (no description available) ii  postgresql-client-9.1                        9.1.9-1ubuntu1              amd64                       front-end programs postgresql 9.1 ii  postgresql-client-9.2                        9.2.4-1.pgdg12.4+1          amd64                       front-end programs postgresql 9.2 ii  postgresql-client-common                     140                                                 manager multiple postgresql client versions ii  postgresql-common                            140                                       

postgresql-9.2 installed (see ii flags in leftmost column), client tools 9.1 , 9.2 mix of pgdg , ubuntu repositories.

anyway, error encountered pg_createcluster quite unusual. output, line number, seem underlying initdb fails when playing postgres.bki file.

for 9.2, file is: /usr/share/postgresql/9.2/postgres.bki. contains low-level commands in sql-like dialect populate cluster pre-initialized data (template databases, pre-defined types , views, etc.)

it's hard imagine file corrupted, since have similar problem when installing 9.1 comes different postgres.bki file right package.

still may check in case what's @ line 5067 , around. in build directory 9.2.4, have this:

 insert oid = 1 ( template1 10 encoding "lc_collate" "lc_ctype" t t -1 0 0 1663 _null_) 

and there isn't ; character anywhere in entire file.

other that, may want remove entire postgresql installation restart clean base:

# purge client packages dpkg --purge postgresql-client-9.1 postgresql-client-9.2 postgresql-client-common # purge server packages dpkg --purge postgresql-9.2 postgresql-common 

Comments

Popular posts from this blog

php - Calling a template part from a post -

Firefox SVG shape not printing when it has stroke -

How to mention the localhost in android -