I can no longer install programs or update after system update

I noticed that after the last update I can no longer install packages, pacman doesn’t open, the update icon in the panel has disappeared and I don’t know how to fix it.

I have no idea what went wrong … I hope it’s not because of some pacdiff I fixed but to be honest I don’t know …

If I try to open by terminal:

[iwakura@iwakura-hp290g4microtowerpc ~]$ pacman
[iwakura@iwakura-hp290g4microtowerpc ~]$ pamac
pamac: error while loading shared libraries: /usr/lib/libpamac.so.11: file too short

Can you use pacman to update or install packages?

pacman -Syu libpamac

If this :point_up: doesn’t work, I think you’d need to do it from a chroot environment.

But, I might be wrong. :man_shrugging:

Can you use pacman to update or install packages?

Like I said…No

[iwakura@iwakura-hp290g4microtowerpc ~]$ su -
Password: 
[iwakura-hp290g4microtowerpc ~]# pacman -Syu libpamac
[iwakura-hp290g4microtowerpc ~]# 

It doesn’t work…

Out of curiosity, I tried to see if changing kernels could improve the situation and I made a bad discovery, the page is totally blank, I can’t change kernels and it doesn’t see the available ones.


I never seen such a thing…something really is gone bad, very bad…

boot into manjaro usb, and use external pacman to reinstall it:

sudo sed -i 's/ trap/#trap/' /usr/lib/manjaro-tools/util-mount.sh
exit | manjaro-chroot -a
sudo pacman --sysroot /mnt -S libpamac pacman --overwrite '*'
1 Like

So I have to run manjaro usb like to install, open a terminal and enter these commands one by one in sequence and then restart the pc like normal.
Is it correct?

yes, you boot into manjaro usb, open terminal and run the commands above… if there are no errors from them, you reboot …
if you have encryption, or use btrfs, those commands will not work, so you mount your root partition, and then you run this:

sudo pacman --sysroot /mnt -S libpamac pacman --overwrite '*'

Honestly I have no idea…I installed manjaro xfce like normal and did not nothing.
I read ext4 in Gparted…I hope it will be fine.

Last thing, is the space correct in this line?

sudo sed -i 's/ trap/#trap/' /usr/lib/manjaro-tools/util-mount.sh

I’m worryng about this part:

‘s/trap/#trap/’

Sorry for all the fuss, but I really want to be sure to do not any stupid error…I don’t want to reinstall all the system today.

yes the command is correct, and even if it was not correct, it would cause no issues… so dont worry

Ok I’m in live now and it does’t goin well.

[manjaro@manjaro ~]$ sudo sed -i 's/ trap/#trap/' /usr/lib/manjaro-tools/until-mount.sh
sed: can't read /usr/lib/manjaro-tools/until-mount.sh: No such file or directory
[manjaro@manjaro ~]$ exit | manjaro-chroot -a
grub-probe: error: cannot find a GRUB drive for /dev/sda1.  Check your device.map.
grub-probe: error: cannot find a GRUB drive for /dev/sda1.  Check your device.map.
==> Mounting (ManjaroLinux) [/dev/nvme0n1p2]
 --> mount: [/mnt]
mount: /mnt: /dev/nvme0n1p2 already mounted on /mnt.
       dmesg(1) may have more information after failed mount system call.
 --> mount: [/mnt/boot/efi]
mount: /mnt/boot/efi: /dev/nvme0n1p1 already mounted on /mnt/boot/efi.
       dmesg(1) may have more information after failed mount system call.
mount: /mnt/sys: sys already mounted on /sys.
       dmesg(1) may have more information after failed mount system call.
 --> umount: []
umount: bad usage
Try 'umount --help' for more information.

And I can’t mount my root partition because every command i tried to mount didn’t worked…just what command is right?

from this output it looks like you run these commands after the partitions were mounted…
type: exit
any errors from it?

There is a typo. It’s util-mount.sh, not until

2 Likes

Ok, my bad.

[manjaro@manjaro ~]$ sudo sed -i 's/ trap/#trap/' /usr/lib/manjaro-tools/util-mount.sh
[manjaro@manjaro ~]$ exit | manjaro-chroot -a
grub-probe: error: cannot find a GRUB drive for /dev/sda1.  Check your device.map.
grub-probe: error: cannot find a GRUB drive for /dev/sda1.  Check your device.map.
==> Mounting (ManjaroLinux) [/dev/nvme0n1p2]
 --> mount: [/mnt]
 --> mount: [/mnt/boot/efi]
[manjaro@manjaro ~]$ 

I don’t see much differences…

If i type exit the terminal closes…

What do you mean? It’s now mounted and you should be able to run the third command.

First try:

[manjaro@manjaro ~]$ sudo sed -i 's/ trap/#trap/' /usr/lib/manjaro-tools/util-mount.sh
[manjaro@manjaro ~]$ exit | manjaro-chroot -a
grub-probe: error: cannot find a GRUB drive for /dev/sda1.  Check your device.map.
grub-probe: error: cannot find a GRUB drive for /dev/sda1.  Check your device.map.
==> Mounting (ManjaroLinux) [/dev/nvme0n1p2]
 --> mount: [/mnt]
mount: /mnt: /dev/nvme0n1p2 already mounted on /mnt.
       dmesg(1) may have more information after failed mount system call.
 --> mount: [/mnt/boot/efi]
mount: /mnt/boot/efi: /dev/nvme0n1p1 already mounted on /mnt/boot/efi.
       dmesg(1) may have more information after failed mount system call.
mount: /mnt/sys: sys already mounted on /sys.
       dmesg(1) may have more information after failed mount system call.
[manjaro@manjaro ~]$ sudo pacman --sysroot /mnt -S libpamac pacman --overwrite '*'
warning: libpamac-11.4.1-3 is up to date -- reinstalling
warning: pacman-6.0.2-6 is up to date -- reinstalling
resolving dependencies...
looking for conflicting packages...

Packages (3) manjaro-mirrors-4.23.2+2+g2f58b3c-2  libpamac-11.4.1-3
             pacman-6.0.2-6

Total Installed Size:  9,07 MiB

:: Proceed with installation? [Y/n] Y
(3/3) checking keys in keyring                     [######################] 100%
(3/3) checking package integrity                   [######################] 100%
error: manjaro-mirrors: signature from "Philip Müller (Called Little) <philm@manjaro.org>" is invalid
:: File /var/cache/pacman/pkg/manjaro-mirrors-4.23.2+2+g2f58b3c-2-any.pkg.tar.xz is corrupted (invalid or corrupted package (PGP signature)).
Do you want to delete it? [Y/n] Y
error: pacman: signature from "Mark Wagie <mark@manjaro.org>" is invalid
:: File /var/cache/pacman/pkg/pacman-6.0.2-6-x86_64.pkg.tar.zst is corrupted (invalid or corrupted package (PGP signature)).
Do you want to delete it? [Y/n] Y
error: libpamac: signature from "Mark Wagie <mark@manjaro.org>" is invalid
:: File /var/cache/pacman/pkg/libpamac-11.4.1-3-x86_64.pkg.tar.zst is corrupted (invalid or corrupted package (PGP signature)).
Do you want to delete it? [Y/n] Y
error: failed to commit transaction (invalid or corrupted package (PGP signature))
Errors occurred, no packages were upgraded.

Second:

[manjaro@manjaro ~]$ sudo pacman --sysroot /mnt -S libpamac pacman --overwrite '*'
warning: libpamac-11.4.1-3 is up to date -- reinstalling
warning: pacman-6.0.2-6 is up to date -- reinstalling
resolving dependencies...
looking for conflicting packages...

Packages (3) manjaro-mirrors-4.23.2+2+g2f58b3c-2  libpamac-11.4.1-3
             pacman-6.0.2-6

Total Download Size:   2,11 MiB
Total Installed Size:  9,07 MiB

:: Proceed with installation? [Y/n] y
:: Retrieving packages...
 pacman-6.0.2-6-x...  1177,9 KiB  1280 KiB/s 00:01 [######################] 100%
 libpamac-11.4.1-...   839,0 KiB  1824 KiB/s 00:00 [######################] 100%
 manjaro-mirrors-4.23.2+2+g2f58b3c-2-any.pkg.tar.xz failed to download
 Total (3/3)             2,1 MiB   299 KiB/s 00:07 [######################] 100%
error: failed retrieving file 'manjaro-mirrors-4.23.2+2+g2f58b3c-2-any.pkg.tar.xz' from ftp.belnet.be : The requested URL returned error: 404
error: failed retrieving file 'manjaro-mirrors-4.23.2+2+g2f58b3c-2-any.pkg.tar.xz' from mirror.futureweb.be : The requested URL returned error: 404
error: failed retrieving file 'manjaro-mirrors-4.23.2+2+g2f58b3c-2-any.pkg.tar.xz' from coresite.mm.fcix.net : The requested URL returned error: 404
error: failed retrieving file 'manjaro-mirrors-4.23.2+2+g2f58b3c-2-any.pkg.tar.xz' from osmirror.org : The requested URL returned error: 404
error: failed retrieving file 'manjaro-mirrors-4.23.2+2+g2f58b3c-2-any.pkg.tar.xz' from manjaro.dcc.uchile.cl : The requested URL returned error: 404
error: failed retrieving file 'manjaro-mirrors-4.23.2+2+g2f58b3c-2-any.pkg.tar.xz' from mirror.2degrees.nz : The requested URL returned error: 404
error: failed retrieving file 'manjaro-mirrors-4.23.2+2+g2f58b3c-2-any.pkg.tar.xz' from mirror.kku.ac.th : The requested URL returned error: 404
error: failed retrieving file 'manjaro-mirrors-4.23.2+2+g2f58b3c-2-any.pkg.tar.xz' from mirror.is.co.za : The requested URL returned error: 404
warning: failed to retrieve some files
error: failed to commit transaction (failed to retrieve some files)
Errors occurred, no packages were upgraded.

Try with:

sudo pacman --sysroot /mnt -Syy libpamac pacman --overwrite '*'
1 Like

before you run the command you need to connect to internet…


[manjaro@manjaro ~]$ sudo pacman --sysroot /mnt -Syy libpamac pacman --overwrite '*'
:: Synchronizing package databases...
 core                  160,3 KiB   534 KiB/s 00:00 [######################] 100%
 extra                1829,0 KiB   998 KiB/s 00:02 [######################] 100%
 community               7,5 MiB  1140 KiB/s 00:07 [######################] 100%
 multilib              166,4 KiB  1067 KiB/s 00:00 [######################] 100%
:: Some packages should be upgraded first...
resolving dependencies...
looking for conflicting packages...

Packages (1) archlinux-keyring-20221220-1

Total Download Size:   1,13 MiB
Total Installed Size:  1,60 MiB
Net Upgrade Size:      0,01 MiB

:: Proceed with installation? [Y/n] Y
:: Retrieving packages...
 archlinux-keyrin...  1153,7 KiB   943 KiB/s 00:01 [######################] 100%
(1/1) checking keys in keyring                     [######################] 100%
(1/1) checking package integrity                   [######################] 100%
(1/1) loading package files                        [######################] 100%
(1/1) checking for file conflicts                  [######################] 100%
(1/1) checking available disk space                [######################] 100%
:: Running pre-transaction hooks...
(1/1) Creating Timeshift snapshot before upgrade...
==> skipping timeshift-autosnap due skipRsyncAutosnap in /etc/timeshift-autosnap.conf set to TRUE.
:: Processing package changes...
(1/1) upgrading archlinux-keyring                  [######################] 100%
ldconfig: File /usr/lib/libalpm.so is empty, not checked.
ldconfig: File /usr/lib/libpamac.so is empty, not checked.
ldconfig: File /usr/lib/libalpm.so.13 is empty, not checked.
ldconfig: File /usr/lib/libpamac.so.11 is empty, not checked.
ldconfig: File /usr/lib/libpamac.so.11.4 is empty, not checked.
ldconfig: File /usr/lib/libalpm.so.13.0.2 is empty, not checked.
:: Running post-transaction hooks...
(1/2) Reloading system manager configuration...
  Skipped: Running in chroot.
(2/2) Arming ConditionNeedsUpdate...

warning: libpamac-11.4.1-3 is up to date -- reinstalling
warning: pacman-6.0.2-6 is up to date -- reinstalling
resolving dependencies...
looking for conflicting packages...
:: pacman-mirrors and manjaro-mirrors are in conflict. Remove manjaro-mirrors? [y/N] y

Packages (4) manjaro-mirrors-4.23.2+2+g2f58b3c-2 [removal]
             pacman-mirrors-4.23.2+2+g2f58b3c-3  libpamac-11.4.1-3
             pacman-6.0.2-6

Total Download Size:   0,17 MiB
Total Installed Size:  9,07 MiB

:: Proceed with installation? [Y/n] Y
:: Retrieving packages...
 pacman-mirrors-4...   173,4 KiB   389 KiB/s 00:00 [######################] 100%
(3/3) checking keys in keyring                     [######################] 100%
(3/3) checking package integrity                   [######################] 100%
(3/3) loading package files                        [######################] 100%
(3/3) checking for file conflicts                  [######################] 100%
(4/4) checking available disk space                [######################] 100%
:: Running pre-transaction hooks...
(1/1) Creating Timeshift snapshot before upgrade...
==> skipping timeshift-autosnap due skipRsyncAutosnap in /etc/timeshift-autosnap.conf set to TRUE.
:: Processing package changes...
(1/1) removing manjaro-mirrors                     [######################] 100%
(1/3) installing pacman-mirrors                    [######################] 100%
warning: /etc/pacman-mirrors.conf installed as /etc/pacman-mirrors.conf.pacnew
Optional dependencies for pacman-mirrors
    gtk3: for interactive mode (GUI) [installed]
    python-gobject: for interactive mode (GUI) [installed]
(2/3) reinstalling pacman                          [######################] 100%
warning: /etc/pacman.conf installed as /etc/pacman.conf.pacnew
(3/3) reinstalling libpamac                        [######################] 100%
warning: /etc/pamac.conf installed as /etc/pamac.conf.pacnew
:: Running post-transaction hooks...
(1/5) Reloading system manager configuration...
  Skipped: Running in chroot.
(2/5) Arming ConditionNeedsUpdate...
(3/5) Updating the MIME type database...
(4/5) Reloading system bus configuration...
  Skipped: Running in chroot.
(5/5) Configuring pacman-mirrors ...
Your current config has been restored.
A new pacman-mirrors.conf is created as /etc/pacman-mirrors-new-20230101.conf
Please verify you're not missing any changes
::INFO Downloading mirrors from Manjaro
::INFO => Mirror pool: https://repo.manjaro.org/mirrors.json
::INFO => Mirror status: https://repo.manjaro.org/status.json
hint: use `pacman-mirrors` to generate and update your pacman mirrorlist.

Wait…now is it ok?

It was always connected…

you have these, but the overwrite command should take care of it… so reboot and see if it worked…
and also check with:
sudo ldconfig
it should not output anything

The thing was that it was trying to retrieve an old package no longer in the mirrors and hence the 404 (404 is a HTTP return code from the server, so there is network connection). What was needed was to update the databases to retrieve the right package.

2 Likes