Results 1 to 2 of 2

Thread: Upgrade caused must not be owned by root ... failed!

  1. #1
    Join Date
    2018-Jan
    Posts
    8

    Upgrade caused must not be owned by root ... failed!

    Hi,
    I encounter the below problem:

    └─$ sudo apt update && sudo apt full-upgrade -y [sudo] password for kali: Hit:1 http://kali.download/kali kali-rolling InRReading package lists... Done
    Building dependency tree... Done
    Reading state information... Done 1 package can be upgraded. Run 'apt list --upgradable' to see it. 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: exfat-fuse gstreamer1.0-pulseaudio libidn11 librest-0.7-0 libsoup-gnome2.4-1 Use 'sudo apt autoremove' to remove them. The following packages will be upgraded: postgresql-13 1 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. 664 not fully installed or removed. Need to get 0 B/14.7 MB of archives. After this operation, 106 kB of additional disk space will be used. Preconfiguring packages ... Setting up libss2:arm64 (1.46.4-1) ... (Reading database ... 255637 files and directories currently installed.) Preparing to unpack .../postgresql-13_13.4-2_arm64.deb ... invoke-rc.d: could not determine current runlevel Stopping PostgreSQL 13 database server: mainError: Data directory /var/lib/postgresql/13/main must not be owned by root ... failed! failed! invoke-rc.d: initscript postgresql, action "stop" failed. dpkg: warning: old postgresql-13 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 13 database server: mainError: Data directory /var/lib/postgresql/13/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-13_13.4-2_arm64.deb (--unpack): new postgresql-13 package pre-removal script subprocess returned error exit status 1 Errors were encountered while processing: /var/cache/apt/archives/postgresql-13_13.4-2_arm64.deb E: Sub-process /usr/bin/dpkg returned an error code (1)

    What did I miss?

  2. #2
    Join Date
    2021-Sep
    Posts
    4
    This is a guess and feel free to quote me but wrong, but to me you seemed to have two options. You either uninstall the package and reinstall it by issuing sudo apt install "package"
    Whatever package this is: /var/lib/postgresql/13/

    Or use chown or chmod I believe it was to change the permissions.
    I'm leaning on chmod atm. Google how to change directory premmisions and do it in root.

    Hope this helps


    EDIT:

    Or do it the easy way and install nautilus and use it to change the premissions
    Last edited by Impudence14; 2021-09-16 at 19:41.

Similar Threads

  1. why .bash_history file is not owned by any package
    By Hemant in forum General Archive
    Replies: 1
    Last Post: 2020-02-21, 16:44
  2. Replies: 0
    Last Post: 2015-09-22, 21:25
  3. Not logging in as root after upgrade
    By Machia in forum TroubleShooting Archive
    Replies: 2
    Last Post: 2014-12-24, 11:05
  4. TOR root problems. Tor is not owned by this user.
    By TumbaBit in forum General Archive
    Replies: 2
    Last Post: 2014-05-27, 09:51

Posting Permissions

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