Page 1 of 2 12 LastLast
Results 1 to 10 of 19

Thread: Sever will not reboot remotely

  1. #1
    Join Date
    Oct 2005
    Location
    Wabasha MN
    Beans
    2,561
    Distro
    Ubuntu

    Sever will not reboot remotely

    I have a server running remotely and I did an update and a upgrade and I wanted to reboot it remotely so I issued a command
    Code:
    reboot
    This didn't work so I did a
    Code:
    shutdown -r
    With the same result. Here is the message I get.
    Code:
    Extracting templates from packages: 100%
    Preconfiguring packages ...
    Setting up ubuntu-keyring (2012.05.19.1) ...
    dpkg: error processing package ubuntu-keyring (--configure):
     subprocess installed post-installation script returned error exit status 1
    Errors were encountered while processing:
     ubuntu-keyring
    E: Sub-process /usr/bin/dpkg returned an error code (1)
    Seeing I am not where the server is, is there away to reboot it.
    I am running 16.04 and I wanted to upgrade to 18.04 using the command
    Code:
    do-release-upgrade
    But I can do this either because I get the same error as when I try to do just a upgrade.
    Any idea how to do to do this?
    Information on my Main laptop. Information on my small laptop Dell 11 3000
    Using a Asus 3632QM laptop with 8gig RAM, 250 SSD.
    Machine Registered 366271, 366273, 366275.
    Registered Ubuntu user number 18630. Registered Linux user number 458093.

  2. #2
    Join Date
    Mar 2010
    Location
    USA
    Beans
    Hidden!
    Distro
    Ubuntu Development Release

    Re: Sever will not reboot remotely

    It looks like it broke in the middle of that update process...

    If you do
    Code:
    sudo apt-get install -f
    That should fix any broken packages and dependencies.
    Then if that doesn't also kickstart it back off where it kicked out of that process... Then
    Code:
    sudo dpkg --configure -a
    will configure the yet to be configured packages.

    If that does not work, then
    Code:
    sudo apt-get clean
    sudo apt-get autoremove
    sudo apt-get update
    sudo apt-get dist-upgrade
    To clean up the recently downloaded packages and redo your upgrades....

    Concurrent coexistance of Windows, Linux and UNIX...
    Ubuntu user # 33563, Linux user # 533637
    Sticky: [all variants] Graphics Resolution- Upgrade /Blank Screen after reboot
    UbuntuForums system-info Script

  3. #3
    Join Date
    Oct 2005
    Location
    Wabasha MN
    Beans
    2,561
    Distro
    Ubuntu

    Re: Sever will not reboot remotely

    I did it all but did not do the
    Code:
    sudo apt-get dist-upgrade
    but did the
    Code:
    sudo apt-get upgrade
    to make sure everything was current. But when I did this I got the same error
    Code:
    E: Sub-process /usr/bin/dpkg returned an error code (1)
    Information on my Main laptop. Information on my small laptop Dell 11 3000
    Using a Asus 3632QM laptop with 8gig RAM, 250 SSD.
    Machine Registered 366271, 366273, 366275.
    Registered Ubuntu user number 18630. Registered Linux user number 458093.

  4. #4
    Join Date
    Sep 2011
    Location
    Behind you!
    Beans
    1,562
    Distro
    Ubuntu 20.04 Focal Fossa

    Re: Sever will not reboot remotely

    Make sure you have a good backup BEFORE you do anything.

    If the dpkg command and force install did not fix the problem, the next step is to remove the software completely and re-install it.

    Code:
    sudo apt remove ubuntu-keyring
    This command should not remove related configuration files (the --purge option would do that though)

    Now clean up the unused packages that are left over:

    Code:
    sudo apt clean
    sudo apt autoremove
    sudo apt update
    Now install the software again:

    Code:
    sudo apt install ubuntu-keyring
    If that does not fix it, then as a last resort, you may need to be more aggressive in the removal such as including "--purge" and then look into manually removing files by seeing what it installs with this command:

    Code:
    sudo ls -l /var/lib/dpkg/info | grep -i ubuntu-keyring
    On my Ubuntu 18.04 server, I see this as a result:
    Code:
    -rw-r--r-- 1 root root     619 Apr  1 06:00 ubuntu-keyring.list
    -rw-r--r-- 1 root root     828 Mar 29 09:33 ubuntu-keyring.md5sums
    -rwxr-xr-x 1 root root     642 Mar 29 09:33 ubuntu-keyring.postinst
    I could then manually remove the files with these commands:

    Code:
    rm /var/lib/dpkg/info/ubuntu-keyring.list
    rm /var/lib/dpkg/info/ubuntu-keyring.md5sums
    rm /var/lib/dpkg/info/ubuntu-keyring.postinst
    Then I would update and re-install the package.

    LHammonds

  5. #5
    Join Date
    Oct 2005
    Location
    Wabasha MN
    Beans
    2,561
    Distro
    Ubuntu

    Re: Sever will not reboot remotely

    Now I am in real trouble.
    After doing
    Code:
    sudo apt remove ubuntu-keyring
    I cannot do any
    Code:
    sudo apt clean
    sudo apt autoremove
    sudo apt update
    or
    Code:
    sudo apt install ubuntu-keyring
    all it says is
    apt: command not found or apt-get command not found
    if I tried apt-get from an older version of ubuntu.
    Once I used the command
    Code:
    sudo apt remove ubuntu-keyring
    it must have removed all the commands. I didn't want to do the purge before you reply to this post.
    Information on my Main laptop. Information on my small laptop Dell 11 3000
    Using a Asus 3632QM laptop with 8gig RAM, 250 SSD.
    Machine Registered 366271, 366273, 366275.
    Registered Ubuntu user number 18630. Registered Linux user number 458093.

  6. #6
    Join Date
    Mar 2010
    Location
    USA
    Beans
    Hidden!
    Distro
    Ubuntu Development Release

    Re: Sever will not reboot remotely

    That's because it's a vicious dependency issue, the apt-get and apt are dependent on the pubic digital signing key and ubuntu-keyring to work. While installing anything, in specific to what was happening to you "ubuntu-keyring, it uses the old version of the keyring, until the new version of the ubunt-keyring is installed... So the correct was to remove the downloaded new version of that package (which seemed to be broken) and download it again, to install it.

    Two options I can think of now...
    First would be to use an ISO image to use as a local repo, and use dpkg to install it from that local repo (so it doesn't need to download it), and forcing dpkg to ignore the signing key. But that would assume that the remote server had access somehow to that that locally accessible image. That is not really a good option for something remote.

    Second option would to circumvent Apt, by using "get" to download the current package from the repo, and used dpkg to install it, and force it to ignore the signing key for that install.

    I think the second option is your best bet for that.

    But what you might do is to also look at a test run of what apt would do, to see if the "why" of the install failure was due to another dependency issue that was not shown in the original error. (maybe due to summary versus verbose messaging)
    Last edited by MAFoElffen; June 19th, 2021 at 08:00 PM.

    Concurrent coexistance of Windows, Linux and UNIX...
    Ubuntu user # 33563, Linux user # 533637
    Sticky: [all variants] Graphics Resolution- Upgrade /Blank Screen after reboot
    UbuntuForums system-info Script

  7. #7
    Join Date
    Oct 2005
    Location
    Wabasha MN
    Beans
    2,561
    Distro
    Ubuntu

    Re: Sever will not reboot remotely

    Even the get command is not found
    Code:
    sudo: get: command not found
    After doing some soul searching, I decided to do a complete backup of all my data files, all 29,848 of them (101.7Gbs).
    Then I downloaded the latest server version of Ubuntu 20.04.2 iso and will burn a USB and install it fresh. I will have to set up my static IP address and then reinstall all the data files, but that way I will have it all up to date.
    I think I got some bad advice from LHammonds, but I think all he was doing was trying to help.
    Thank you all for jumping in here.
    Irv
    Information on my Main laptop. Information on my small laptop Dell 11 3000
    Using a Asus 3632QM laptop with 8gig RAM, 250 SSD.
    Machine Registered 366271, 366273, 366275.
    Registered Ubuntu user number 18630. Registered Linux user number 458093.

  8. #8
    Join Date
    Mar 2010
    Location
    USA
    Beans
    Hidden!
    Distro
    Ubuntu Development Release

    Re: Sever will not reboot remotely

    You are welcome. We all try to help. That is the intent.

    To me, helping others is giving back to all those who have mentored and helped me through the years. I still learn something new every day.

    Concurrent coexistance of Windows, Linux and UNIX...
    Ubuntu user # 33563, Linux user # 533637
    Sticky: [all variants] Graphics Resolution- Upgrade /Blank Screen after reboot
    UbuntuForums system-info Script

  9. #9
    Join Date
    Sep 2011
    Location
    Behind you!
    Beans
    1,562
    Distro
    Ubuntu 20.04 Focal Fossa

    Re: Sever will not reboot remotely

    Quote Originally Posted by irv View Post
    Now I am in real trouble.
    I hope you made a backup BEFORE making any changes which was my first and most important suggestion.

    Quote Originally Posted by irv View Post
    apt: command not found or apt-get command not found
    "not found" does not mean it isn't there. It might have just lost where it is located (e.g. path).
    Code:
    /usr/bin/apt
    Not sure what MAFoElffen was talking about regarding "get" because "get" by itself is not a command...maybe "/usr/bin/wget" which will download a file from a URL. There is a "get" command parameter for "apt" but I don't think that would bypass apt like what was described.

    Granted, I have never tried to uninstall / reinstall ubuntu-keyring and fairly ignorant to actual repercussions of doing so. If I made your situation worse, I did not mean to do so and I'm very sorry.

    EDIT: PS - Your picture looks exactly like my father.

    LHammonds

  10. #10
    Join Date
    Mar 2010
    Location
    USA
    Beans
    Hidden!
    Distro
    Ubuntu Development Release

    Re: Sever will not reboot remotely

    Get (functually) using the utility "wget", which does not check digital signing to access a mirror:
    Code:
    wget http://ubuntu.mirrors.tds.net/ubuntu/pool/main/u/ubuntu-keyring/ubuntu-keyring_2020.02.11.2_all.deb
    sudo dkg -i ./ubuntu-keyring_2020.02.11.2_all.deb
    Apt uses the GPG keys stored iin the apt keyring file to check and sign packages in repos... The package ubuntu-keyring contains the GPG keys of the Ubuntu archive. Without those GPG keys, Apt cannot access the Ubuntu repos. And that ubuntu package covers the keys for all Ubuntu repos, immaterial of versions or architecture.

    Doing it manually, using both commands above, circumvents that process, and requirement. And if for some reason, dpkg balks at not finding or a wrong digital or missing key/signature, then use -force-install in place of -i ... Not something that you would do normally on untrusted, but the mirror is trusted, and it is manually without the matching keys.

    You are correct, if the system said apt and apt-get are now "not found" in the command path, then there are other more serious problems. And removing a key-ring package did not cause any problem related to that. And in that case, just re-installing the keyring is not going to fix that.
    Last edited by MAFoElffen; June 20th, 2021 at 12:49 PM.

    Concurrent coexistance of Windows, Linux and UNIX...
    Ubuntu user # 33563, Linux user # 533637
    Sticky: [all variants] Graphics Resolution- Upgrade /Blank Screen after reboot
    UbuntuForums system-info Script

Page 1 of 2 12 LastLast

Bookmarks

Posting Permissions

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