PDA

View Full Version : postgresql-15



kopepoc
2023-01-09, 15:14
Error while updating nh in Termux:


# 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)

kopepoc
2023-01-17, 09:17
Still getting the error.


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!

Fred Sheehan
2023-01-23, 01:07
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

kopepoc
2023-01-27, 07:57
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!!!!!

kalinf
2023-06-03, 10:57
Thanks Fred.
I was facing the same problem and now I have it solved.