Results 1 to 4 of 4

Thread: postgresql-15

  1. #1
    Join Date
    2022-Oct
    Posts
    13

    postgresql-15

    Error while updating nh in Termux:
    Code:
    # apt full-upgrade -y
    Reading package lists... Done
    Building dependency tree... Done
    Reading state information... Done
    Calculating upgrade... Done
    The following packages were automatically installed and are no longer required:
      catfish docutils-common gir1.2-xfconf-0
      libicu71 libimagequant0 libprotobuf23
      libraqm0 liburing2 libzxingcore1 plocate
      python3-alabaster python3-docutils
      python3-imagesize python3-olefile
      python3-pexpect python3-pil
      python3-ptyprocess python3-pygments
      python3-roman python3-snowballstemmer
      python3-sphinx ruby3.0 ruby3.0-dev
      ruby3.0-doc sphinx-common
    Use 'apt autoremove' to remove them.
    The following packages will be upgraded:
      postgresql-15
    1 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
    174 not fully installed or removed.
    Need to get 0 B/16.2 MB of archives.
    After this operation, 1024 B of additional disk space will be used.
    Preconfiguring packages ...
    (Reading database ... 297418 files and directories currently installed.)
    Preparing to unpack .../postgresql-15_15.1-1+b1_arm64.deb ...
    invoke-rc.d: could not determine current runlevel
    Stopping PostgreSQL 15 database server: mainError: Data directory /var/lib/postgresql/15/main must not be owned by root ... failed!
     failed!
    invoke-rc.d: initscript postgresql, action "stop" failed.
    dpkg: warning: old postgresql-15 package pre-removal script subprocess returned error exit status 1
    dpkg: trying script from the new package instead ...
    invoke-rc.d: could not determine current runlevel
    Stopping PostgreSQL 15 database server: mainError: Data directory /var/lib/postgresql/15/main must not be owned by root ... failed!
     failed!
    invoke-rc.d: initscript postgresql, action "stop" failed.
    dpkg: error processing archive /var/cache/apt/archives/postgresql-15_15.1-1+b1_arm64.deb (--unpack):
     new postgresql-15 package pre-removal script subprocess returned error exit status 1
    Errors were encountered while processing:
     /var/cache/apt/archives/postgresql-15_15.1-1+b1_arm64.deb
    E: Sub-process /usr/bin/dpkg returned an error code (1)

  2. #2
    Join Date
    2022-Oct
    Posts
    13
    Still getting the error.
    Code:
    Preparing to unpack .../30-postgresql-15_15.1-1+b1_arm64.deb ...
    invoke-rc.d: could not determine current runlevel
    Stopping PostgreSQL 15 database server: mainError: Data directory /var/lib/postgresql/15/main must not be owned by root ... failed!
     failed!

  3. #3
    Join Date
    2021-May
    Location
    UK
    Posts
    603
    This is the nuke it and restart approach to postgreql problems..

    sudo apt update && sudo apt full-upgrade -y

    Now run this, you HAVE to run these together or it will not work:

    rm -rf /var/lib/dpkg/info/postgresql* && dpkg --configure -a

    You then need to run this to upgrade the package again

    sudo apt update && sudo apt full-upgrade -y

  4. #4
    Join Date
    2022-Oct
    Posts
    13
    Quote Originally Posted by Fred Sheehan View Post
    This is the nuke it and restart approach to postgreql problems..

    sudo apt update && sudo apt full-upgrade -y

    Now run this, you HAVE to run these together or it will not work:

    rm -rf /var/lib/dpkg/info/postgresql* && dpkg --configure -a

    You then need to run this to upgrade the package again

    sudo apt update && sudo apt full-upgrade -y
    Thank you very much, worked like a charm!!!!!

Similar Threads

  1. Need a little help with postgresql
    By James123456 in forum TroubleShooting Archive
    Replies: 4
    Last Post: 2021-03-05, 09:03
  2. Help with postgresql
    By YoungAr in forum Installing NetHunter
    Replies: 0
    Last Post: 2020-11-12, 16:06
  3. Postgresql won't start
    By DrDinosaur in forum TroubleShooting Archive
    Replies: 3
    Last Post: 2015-07-20, 12:47

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •