Postgresql 10.4 installation issues on Ubuntu 14.05

Started by vardenis pavardenisalmost 8 years ago13 messagesgeneral
Jump to latest
#1vardenis pavardenis
vyr.prokuroras@gmail.com

Hello.
I am trying install postgresql 10.4 on Ubuntu 14.05 server (x64).
On Ubuntu i installed only ssh service for remote access.
I am trying install it via Apt Repository (https://www.postgresql.org/
download/linux/ubuntu/).
I did:

sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt/
$(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list'

sudo apt-get install wget ca-certificates
wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc |
sudo apt-key add -
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install postgresql-10

and get some errors:

Removing obsolete dictionary files:

* No PostgreSQL clusters exist; see "man pg_createcluster"

Processing triggers for ureadahead (0.100.0-16) ...

Setting up postgresql-10 (10.4-2.pgdg14.04+1) ...

Creating new PostgreSQL cluster 10/main ...

/usr/lib/postgresql/10/bin/initdb -D /var/lib/postgresql/10/main
--auth-local peer --auth-host md5

The files belonging to this database system will be owned by user "postgres".

This user must also own the server process.

The database cluster will be initialized with locale "en_US.UTF-8".

The default database encoding has accordingly been set to "UTF8".

The default text search configuration will be set to "english".

Data page checksums are disabled.

fixing permissions on existing directory /var/lib/postgresql/10/main ... ok

creating subdirectories ... ok

selecting default max_connections ... 100

selecting default shared_buffers ... 128MB

selecting dynamic shared memory implementation ... posix

creating configuration files ... ok

running bootstrap script ... ok

performing post-bootstrap initialization ... ok

syncing data to disk ... ok

Success. You can now start the database server using:

/usr/lib/postgresql/10/bin/pg_ctl -D /var/lib/postgresql/10/main
-l logfile start

Ver Cluster Port Status Owner Data directory Log file

10 main 5432 down postgres /var/lib/postgresql/10/main
/var/log/postgresql/postgresql-10-main.log

update-alternatives: using
/usr/share/postgresql/10/man/man1/postmaster.1.gz to provide
/usr/share/man/man1/postmaster.1.gz (postmaster.1.gz) in auto mode

* Starting PostgreSQL 10 database server
* Failed to issue method call: Unit postgresql@10-main.service failed
to load: No such file or directory. See system logs and 'systemctl
status postgresql@10-main.service' for details.

[fail]

invoke-rc.d: initscript postgresql, action "start" failed.

dpkg: error processing package postgresql-10 (--configure):

subprocess installed post-installation script returned error exit status 1

dpkg: dependency problems prevent configuration of postgresql:

postgresql depends on postgresql-10; however:

Package postgresql-10 is not configured yet.

dpkg: error processing package postgresql (--configure):

dependency problems - leaving unconfigured

Processing triggers for libc-bin (2.19-0ubuntu6.14) ...

No apport report written because the error message indicates its a
followup error from a previous failure.

Errors were encountered while
processing:

postgresql-10

postgresql

E: Sub-process /usr/bin/dpkg returned an error code (1)

thanks for any reponse.

#2Adrian Klaver
adrian.klaver@aklaver.com
In reply to: vardenis pavardenis (#1)
Re: Postgresql 10.4 installation issues on Ubuntu 14.05

On 07/27/2018 08:17 AM, vardenis pavardenis wrote:

Hello.
I am trying install postgresql 10.4 on Ubuntu 14.05 server (x64).
On Ubuntu i installed only ssh service for remote access.
I am trying install it via Apt Repository
(https://www.postgresql.org/download/linux/ubuntu/
<https://www.postgresql.org/download/linux/ubuntu/&gt;).
I did:

sudo sh -c 'echo "debhttp://apt.postgresql.org/pub/repos/apt/
<http://apt.postgresql.org/pub/repos/apt/&gt; $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list'

sudo apt-get install wget ca-certificates
wget --quiet -O -https://www.postgresql.org/media/keys/ACCC4CF8.asc
<https://www.postgresql.org/media/keys/ACCC4CF8.asc&gt; | sudo apt-key add -
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install postgresql-10

and get some errors:

  Package postgresql-10 is not configured yet.

dpkg: error processing package postgresql (--configure):

dependency problems - leaving unconfigured

Processing triggers for libc-bin (2.19-0ubuntu6.14) ...

No apport report written because the error message indicates its a
followup error from a previous failure.

  Errors were encountered while processing:

postgresql-10

postgresql

E: Sub-process /usr/bin/dpkg returned an error code (1)

thanks for any reponse.

Best guess, cross contamination with the Ubuntu package(s) for Postgres.

What does:

dpkg -l | grep postgres

show?

--
Adrian Klaver
adrian.klaver@aklaver.com

#3Adrian Klaver
adrian.klaver@aklaver.com
In reply to: vardenis pavardenis (#1)
Re: Postgresql 10.4 installation issues on Ubuntu 14.05

On 07/27/2018 04:50 PM, vardenis pavardenis wrote:
Please reply to list also.
Ccing list.

FYI, bottom/interleaved posting are the preferred styles on this list:

https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
https://en.wikipedia.org/wiki/Posting_style#Bottom-posting

Hello.
So sorry, looks like i make a "misscut" and paste less info i wanted:

No, you pasted all the below in your previous post. I just cut out a
bunch in my reply to make it more readable.

In case you did not see all my previous post, I asked :

Best guess, cross contamination with the Ubuntu package(s) for Postgres.

What does:

dpkg -l | grep postgres

show?

Creating config file /etc/postgresql-common/createcluster.conf with new
version

Building PostgreSQL dictionaries from installed myspell/hunspell packages...

Removing obsolete dictionary files:

* No PostgreSQL clusters exist; see "man pg_createcluster"

Processing triggers for ureadahead (0.100.0-16) ...

Setting up postgresql-10 (10.4-2.pgdg14.04+1) ...

Creating new PostgreSQL cluster 10/main ...

/usr/lib/postgresql/10/bin/initdb -D /var/lib/postgresql/10/main
--auth-local peer --auth-host md5

The files belonging to this database system will be owned by user
"postgres".

This user must also own the server process.

The database cluster will be initialized with locale "en_US.UTF-8".

The default database encoding has accordingly been set to "UTF8".

The default text search configuration will be set to "english".

Data page checksums are disabled.

fixing permissions on existing directory /var/lib/postgresql/10/main ... ok

creating subdirectories ... ok

selecting default max_connections ... 100

selecting default shared_buffers ... 128MB

selecting dynamic shared memory implementation ... posix

creating configuration files ... ok

running bootstrap script ... ok

performing post-bootstrap initialization ... ok

syncing data to disk ... ok

Success. You can now start the database server using:

    /usr/lib/postgresql/10/bin/pg_ctl -D /var/lib/postgresql/10/main -l
logfile start

Ver Cluster Port Status Owner    Data directory              Log file

10  main    5432 down   postgres /var/lib/postgresql/10/main
/var/log/postgresql/postgresql-10-main.log

update-alternatives: using
/usr/share/postgresql/10/man/man1/postmaster.1.gz to provide
/usr/share/man/man1/postmaster.1.gz (postmaster.1.gz) in auto mode

* Starting PostgreSQL 10 database server * Failed to issue method call:
Unit postgresql@10-main.service failed to load: No such file or
directory. See system logs and 'systemctl status
postgresql@10-main.service' for details.

          [fail]

invoke-rc.d: initscript postgresql, action "start" failed.

dpkg: error processing package postgresql-10 (--configure):

subprocess installed post-installation script returned error exit status 1

dpkg: dependency problems prevent configuration of postgresql:

postgresql depends on postgresql-10; however:

  Package postgresql-10 is not configured yet.

dpkg: error processing package postgresql (--configure):

dependency problems - leaving unconfigured

Processing triggers for libc-bin (2.19-0ubuntu6.14) ...

No apport report written because the error message indicates its a
followup error from a previous failure.

  Errors were encountered while processing:

postgresql-10

postgresql

E: Sub-process /usr/bin/dpkg returned an error code (1)

thanks.

--
Adrian Klaver
adrian.klaver@aklaver.com

#4vardenis pavardenis
vyr.prokuroras@gmail.com
In reply to: Adrian Klaver (#3)
Re: Postgresql 10.4 installation issues on Ubuntu 14.05

2018-07-28 3:12 GMT+03:00 Adrian Klaver <adrian.klaver@aklaver.com>:

On 07/27/2018 04:50 PM, vardenis pavardenis wrote:
Please reply to list also.
Ccing list.

FYI, bottom/interleaved posting are the preferred styles on this list:

https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
https://en.wikipedia.org/wiki/Posting_style#Bottom-posting

Hello.

So sorry, looks like i make a "misscut" and paste less info i wanted:

No, you pasted all the below in your previous post. I just cut out a bunch
in my reply to make it more readable.

Sry, my fault.

In case you did not see all my previous post, I asked :

Best guess, cross contamination with the Ubuntu package(s) for Postgres.

What does:

dpkg -l | grep postgres

show?

tadas@ubuntu:~$ dpkg -l | grep postgres
ii pgdg-keyring
2017.3
all keyring for apt.postgresql.org
iU postgresql
10+191.pgdg14.04+1
all object-relational SQL database (supported version)
iF postgresql-10
10.4-2.pgdg14.04+1
amd64 object-relational SQL database, version 10 server
ii postgresql-client-10
10.4-2.pgdg14.04+1
amd64 front-end programs for PostgreSQL 10
ii postgresql-client-common
191.pgdg14.04+1
all manager for multiple PostgreSQL client versions
ii postgresql-common
191.pgdg14.04+1
all PostgreSQL database-cluster manager
tadas@ubuntu:~$

Show quoted text

--
Adrian Klaver
adrian.klaver@aklaver.com

#5rob stone
floriparob@gmail.com
In reply to: vardenis pavardenis (#4)
Re: Postgresql 10.4 installation issues on Ubuntu 14.05

Hello,

On Mon, 2018-07-30 at 09:01 +0300, vardenis pavardenis wrote:

tadas@ubuntu:~$ dpkg -l | grep postgres
ii pgdg-keyring
2017.3

all keyring for apt.postgresql.org
iU postgresql
10+191.pgdg14.04+1

all object-relational SQL database (supported version)
iF postgresql-10 10.4-
2.pgdg14.04+1

amd64
object-relational SQL database, version 10 server
ii postgresql-client-10 10.4-
2.pgdg14.04+1

amd64
front-end programs for PostgreSQL 10
ii postgresql-client-common
191.pgdg14.04+1

all manager for multiple PostgreSQL client versions
ii postgresql-common
191.pgdg14.04+1

all PostgreSQL database-cluster manager
tadas@ubuntu:~$

Your installation has not completed successfully.

iU postgresql 10+191.pgdg14.04+1 --- the letter "U" means the package
has only been un-packed.

iF postgresql-10 10.4-2.pgdg14.04+1 -- the letter "F" means the
package is only half-configured.

HTH,
Robert

#6vardenis pavardenis
vyr.prokuroras@gmail.com
In reply to: rob stone (#5)
Re: Postgresql 10.4 installation issues on Ubuntu 14.05

2018-07-30 9:31 GMT+03:00 rob stone <floriparob@gmail.com>:

Hello,

On Mon, 2018-07-30 at 09:01 +0300, vardenis pavardenis wrote:

tadas@ubuntu:~$ dpkg -l | grep postgres
ii pgdg-keyring
2017.3

all keyring for apt.postgresql.org
iU postgresql
10+191.pgdg14.04+1

all object-relational SQL database (supported version)
iF postgresql-10 10.4-
2.pgdg14.04+1

amd64
object-relational SQL database, version 10 server
ii postgresql-client-10 10.4-
2.pgdg14.04+1

amd64
front-end programs for PostgreSQL 10
ii postgresql-client-common
191.pgdg14.04+1

all manager for multiple PostgreSQL client versions
ii postgresql-common
191.pgdg14.04+1

all PostgreSQL database-cluster manager
tadas@ubuntu:~$

Your installation has not completed successfully.

iU postgresql 10+191.pgdg14.04+1 --- the letter "U" means the package
has only been un-packed.

iF postgresql-10 10.4-2.pgdg14.04+1 -- the letter "F" means the
package is only half-configured.

hello.

thats interesting.
maybe you have clue why it happened (i tried install by instructions) and
how to fix it? :)
thanks

Show quoted text

HTH,
Robert

#7Adrian Klaver
adrian.klaver@aklaver.com
In reply to: vardenis pavardenis (#6)
Re: Postgresql 10.4 installation issues on Ubuntu 14.05

On 07/30/2018 12:40 AM, vardenis pavardenis wrote:

hello.
thats interesting.
maybe you have clue why it happened (i tried install by instructions)
and how to fix it? :)

Purge the existing packages and try installing again.

thanks

HTH,
Robert

--
Adrian Klaver
adrian.klaver@aklaver.com

#8Adrian Klaver
adrian.klaver@aklaver.com
In reply to: vardenis pavardenis (#6)
Re: Postgresql 10.4 installation issues on Ubuntu 14.05

On 07/30/2018 12:40 AM, vardenis pavardenis wrote:

hello.
thats interesting.
maybe you have clue why it happened (i tried install by instructions)
and how to fix it? :)

Just dawned on me that you are running 14.05 not 14.04 and that the
packages you installed are for 14.04.

Per here:

https://www.postgresql.org/download/linux/ubuntu/

only the LTS versions are officially supported. You might want to try
installing the 16.04 version on the theory it is more likely to be
backwards compatible then the 14.04 being forward compatible.

thanks

HTH,
Robert

--
Adrian Klaver
adrian.klaver@aklaver.com

#9vardenis pavardenis
vyr.prokuroras@gmail.com
In reply to: Adrian Klaver (#8)
Re: Postgresql 10.4 installation issues on Ubuntu 14.05

2018-07-30 16:51 GMT+03:00 Adrian Klaver <adrian.klaver@aklaver.com>:

On 07/30/2018 12:40 AM, vardenis pavardenis wrote:

hello.

thats interesting.
maybe you have clue why it happened (i tried install by instructions) and
how to fix it? :)

Just dawned on me that you are running 14.05 not 14.04 and that the
packages you installed are for 14.04.

nice shot!
Will try it.
Thanks.

Show quoted text

Per here:

https://www.postgresql.org/download/linux/ubuntu/

only the LTS versions are officially supported. You might want to try
installing the 16.04 version on the theory it is more likely to be
backwards compatible then the 14.04 being forward compatible.

thanks

HTH,
Robert

--
Adrian Klaver
adrian.klaver@aklaver.com

#10vardenis pavardenis
vyr.prokuroras@gmail.com
In reply to: Adrian Klaver (#7)
Re: Postgresql 10.4 installation issues on Ubuntu 14.05

2018-07-30 16:39 GMT+03:00 Adrian Klaver <adrian.klaver@aklaver.com>:

On 07/30/2018 12:40 AM, vardenis pavardenis wrote:

hello.

thats interesting.
maybe you have clue why it happened (i tried install by instructions) and
how to fix it? :)

Purge the existing packages and try installing again.

Did it already few times per few weeks. And google didn't help :)
that's because i am here. (i even try installer from here:
https://www.enterprisedb.com/downloads/postgres-postgresql-downloads, but
with the same result - server can't start.)
Anyway thanks for suggestion.

Show quoted text

thanks

HTH,
Robert

--
Adrian Klaver
adrian.klaver@aklaver.com

#11Adrian Klaver
adrian.klaver@aklaver.com
In reply to: vardenis pavardenis (#9)
Re: Postgresql 10.4 installation issues on Ubuntu 14.05

On 07/30/2018 10:33 AM, vardenis pavardenis wrote:

2018-07-30 16:51 GMT+03:00 Adrian Klaver <adrian.klaver@aklaver.com
<mailto:adrian.klaver@aklaver.com>>:

On 07/30/2018 12:40 AM, vardenis pavardenis wrote:

hello.
thats interesting.
maybe you have clue why it happened (i tried install by
instructions) and how to fix it? :)

Just dawned on me that you are running 14.05 not 14.04 and that the
packages you installed are for 14.04.

nice shot!
Will try it.

If that does no work you can always install from source:

https://www.postgresql.org/ftp/source/v10.4/

That will require installing dev packages though.

Thanks.

--
Adrian Klaver
adrian.klaver@aklaver.com

#12vardenis pavardenis
vyr.prokuroras@gmail.com
In reply to: Adrian Klaver (#11)
Re: Postgresql 10.4 installation issues on Ubuntu 14.05

2018-07-31 0:02 GMT+03:00 Adrian Klaver <adrian.klaver@aklaver.com>:

On 07/30/2018 10:33 AM, vardenis pavardenis wrote:

2018-07-30 16:51 GMT+03:00 Adrian Klaver <adrian.klaver@aklaver.com
<mailto:adrian.klaver@aklaver.com>>:

On 07/30/2018 12:40 AM, vardenis pavardenis wrote:

hello.
thats interesting.
maybe you have clue why it happened (i tried install by
instructions) and how to fix it? :)

Just dawned on me that you are running 14.05 not 14.04 and that the
packages you installed are for 14.04.

nice shot!
Will try it.

ok. looks like problem solved, but anyway i wanna share a solution (thanks
a lot Adrian one more time).
I downloadad archived ubuntu iso (
http://old-releases.ubuntu.com/releases/14.04.0/ - i picked the last one:
"64bit-PC (AMD64) server install image.". Reinstalled server.

follow instructions on https://wiki.postgresql.org/wiki/Apt

got:
Success. You can now start the database server using:

/usr/lib/postgresql/10/bin/pg_ctl -D /var/lib/postgresql/10/main -l
logfile start

Ver Cluster Port Status Owner Data directory Log file
10 main 5432 down postgres /var/lib/postgresql/10/main
/var/log/postgresql/postgresql-10-main.log
update-alternatives: using
/usr/share/postgresql/10/man/man1/postmaster.1.gz to provide
/usr/share/man/man1/postmaster.1.gz (postmaster.1.gz) in auto mode
* Starting PostgreSQL 10 database
server
[ OK ]
Processing triggers for libc-bin (2.19-0ubuntu6.14) ...
tadas@ubuntu:~$ service postgresql status
10/main (port 5432): online

thanks Adrian, rob and pgsql-general!!!

PS (offtopic): One thing i can't understand - after installation this
release shows: Ubuntu 14.04.5 LTS. My problematic installation also was
Ubuntu 14.04.5 LTS (i make mistake when say it is "14.05"). same versions
are different? its leagal?

Show quoted text

If that does no work you can always install from source:

https://www.postgresql.org/ftp/source/v10.4/

That will require installing dev packages though.

Thanks.

--
Adrian Klaver
adrian.klaver@aklaver.com

#13Adrian Klaver
adrian.klaver@aklaver.com
In reply to: vardenis pavardenis (#12)
Re: Postgresql 10.4 installation issues on Ubuntu 14.05

On 07/31/2018 06:12 AM, vardenis pavardenis wrote:

2018-07-31 0:02 GMT+03:00 Adrian Klaver <adrian.klaver@aklaver.com
<mailto:adrian.klaver@aklaver.com>>:

On 07/30/2018 10:33 AM, vardenis pavardenis wrote:

2018-07-30 16:51 GMT+03:00 Adrian Klaver
<adrian.klaver@aklaver.com <mailto:adrian.klaver@aklaver.com>
<mailto:adrian.klaver@aklaver.com
<mailto:adrian.klaver@aklaver.com>>>:

    On 07/30/2018 12:40 AM, vardenis pavardenis wrote:

        hello.
        thats interesting.
        maybe you have clue why it happened (i tried install by
        instructions) and how to fix it? :)

    Just dawned on me that you are running 14.05 not 14.04 and
that the
    packages you installed are for 14.04.

nice shot!
Will try it.

ok. looks like problem solved, but anyway i wanna share a solution
(thanks a lot Adrian one more time).
I downloadad archived ubuntu iso
(http://old-releases.ubuntu.com/releases/14.04.0/ - i picked the last
one:  "64bit-PC (AMD64) server install image.". Reinstalled server.

follow instructions on https://wiki.postgresql.org/wiki/Apt

got:
Success. You can now start the database server using:

    /usr/lib/postgresql/10/bin/pg_ctl -D /var/lib/postgresql/10/main -l
logfile start

Ver Cluster Port Status Owner    Data directory              Log file
10  main    5432 down   postgres /var/lib/postgresql/10/main
/var/log/postgresql/postgresql-10-main.log
update-alternatives: using
/usr/share/postgresql/10/man/man1/postmaster.1.gz to provide
/usr/share/man/man1/postmaster.1.gz (postmaster.1.gz) in auto mode
 * Starting PostgreSQL 10 database
server
[ OK ]
Processing triggers for libc-bin (2.19-0ubuntu6.14) ...
tadas@ubuntu:~$ service postgresql status
10/main (port 5432): online

thanks Adrian, rob and pgsql-general!!!

PS (offtopic): One thing i can't understand - after installation this
release shows: Ubuntu 14.04.5 LTS. My problematic installation also was
Ubuntu 14.04.5 LTS (i make mistake when say it is "14.05"). same
versions are different? its leagal?

Yes, it is a point release:

https://en.wikipedia.org/wiki/Ubuntu_version_history#Ubuntu_14.04_LTS_(Trusty_Tahr)

If that does no work you can always install from source:

https://www.postgresql.org/ftp/source/v10.4/
<https://www.postgresql.org/ftp/source/v10.4/&gt;

That will require installing dev packages though.

Thanks.

--
Adrian Klaver
adrian.klaver@aklaver.com <mailto:adrian.klaver@aklaver.com>

--
Adrian Klaver
adrian.klaver@aklaver.com