You are not logged in.

#1 2021-05-24 20:53:16

mtnflyr
Member
Registered: 2021-05-24
Posts: 6

[SOLVED] Pacman returns command prompt with no output

My laptop was forced to shutdown during a pacman -Syu system upgrade.  Any pacman command now simply returns the command prompt with no output.  The same happens for any other command requiring sudo.  I was able to accomplish a system upgrade by following the steps here:   https://wiki.archlinux.org/title/Pacman … an_upgrade

I have been using Arch for about 6 months and installed twice by following the wiki installation guide.  I would prefer to learn how to fix this problem without reinstalling, if possible.

The number of broken packages listed by running "find /usr/lib -size 0" is large.  I can post that list if it would be helpful.  Below is the pacman.log from the interrupted upgrade on 5/17 and the update via live media and --sysroot the next day.  Thanks in advance for any help.

http://ix.io/3nLB

Last edited by mtnflyr (2021-05-25 03:18:13)

Offline

#2 2021-05-24 21:42:25

teckk
Member
Registered: 2013-02-21
Posts: 589

Re: [SOLVED] Pacman returns command prompt with no output

Did you do step 6 in the wiki?

5. After the upgrade, one way to double-check for not upgraded but still broken packages: find /mnt/usr/lib -size 0
6. Followed by a re-install of any still broken package via pacman --sysroot /mnt -S package.

Offline

#3 2021-05-24 22:09:02

mtnflyr
Member
Registered: 2021-05-24
Posts: 6

Re: [SOLVED] Pacman returns command prompt with no output

Step 5 produces a long list of files.  I think I would need to determine the package ownership of each of those files to know which packages to reinstall.  Is this correct?

I tried a few packages which I guessed owned some of the files.  I reinstalled the linux kernel, which allowed me to boot again.  Attempts to reinstall pacman and sudo produce errors and do not reinstall.  Is my next step to use pacman with the live media --sysroot method to query each file for the package it belongs to?

Offline

#4 2021-05-24 22:29:41

loqs
Member
Registered: 2014-03-06
Posts: 19,010

Re: [SOLVED] Pacman returns command prompt with no output

From the live media with the installation's file-systems mounted what is the output of

pacman --root /mnt -Qkk 2>&1 | grep -Fv '0 altered files'

Edit:
As you indicated the installation's pacman command is failing,  that could also cause --sysroot to fail as it chroots into the install and uses its libraries.
So as a precaution I am suggesting switching to --root which only uses libraries from the live media.

Last edited by loqs (2021-05-24 22:36:28)

Offline

#5 2021-05-24 23:05:16

mtnflyr
Member
Registered: 2021-05-24
Posts: 6

Re: [SOLVED] Pacman returns command prompt with no output

Thanks for the reply. The requested output is here:

http://sprunge.us/HZVWTK

(I’m still learning how to best post logs)

Offline

#6 2021-05-24 23:56:51

loqs
Member
Registered: 2014-03-06
Posts: 19,010

Re: [SOLVED] Pacman returns command prompt with no output

lpsolve: no mtree file
pacman: no mtree file
svt-av1: no mtree file

First command restores the mtree,  the second restores the packages themselves.

pacman --root /mnt --cache /mnt/var/cache/pacman/pkg --dbonly -S lpsolve pacman svt-av1
pacman --root /mnt --cache /mnt/var/cache/pacman/pkg -S lpsolve pacman svt-av1

Hopefully that fixes pacman.  Not seeing anything sudo related in the log.  Either the package is fine or it has been corrupted so badly pacman has no record of it.

Offline

#7 2021-05-25 00:40:53

mtnflyr
Member
Registered: 2021-05-24
Posts: 6

Re: [SOLVED] Pacman returns command prompt with no output

Those commands were certainly helpful.  Pacman now works correctly when I switch to the root user.  However, for the regular user it only works for queries which do not require root privileges. 

I apparently still have a sudo problem.  Sudo pacman still gives me the command prompt with no output as does any other command preceded by sudo.

Last edited by mtnflyr (2021-05-25 03:18:48)

Offline

#8 2021-05-25 00:55:10

loqs
Member
Registered: 2014-03-06
Posts: 19,010

Re: [SOLVED] Pacman returns command prompt with no output

Does pacman have any knowledge of sudo:

pacman -Qikk sudo

Offline

#9 2021-05-25 00:56:45

mtnflyr
Member
Registered: 2021-05-24
Posts: 6

Re: [SOLVED] Pacman returns command prompt with no output

$ pacman -Qikk sudo
error: package 'sudo' was not found
# pacman -S sudo

http://sprunge.us/zXFjHk

Last edited by mtnflyr (2021-05-25 01:30:17)

Offline

#10 2021-05-25 01:25:50

loqs
Member
Registered: 2014-03-06
Posts: 19,010

Re: [SOLVED] Pacman returns command prompt with no output

Split the command again.  first fix the database then fix the files.

pacman -S --dbonly sudo
pacman -S sudo

Offline

#11 2021-05-25 01:38:20

mtnflyr
Member
Registered: 2021-05-24
Posts: 6

Re: [SOLVED] Pacman returns command prompt with no output

That fixed it.  I should have thought to try that.

Thank you very much for the help.

Offline

Board footer

Powered by FluxBB