Hi @lijunjie,
I think you need to boot into a live environment, enter a chroot
environment from there, download the pacman-static
package there, and re-sync your system with that.
How to chroot
-
Ensure you’ve got a relatively new ISO or at least one with a still supported LTS kernel.
-
Write/copy/
dd
the ISO to a USB thumb drive. -
When done, boot with the above mentioned USB thumb drive into the live environment.
-
Once booted, open a terminal and enter the following command to enter the
chroot
encironment:
manjaro-chroot -a
- If you have more than one Linux installation, select the correct one to use from the list provided.
When done, you should now be in the chroot
environment.
But, be careful, as you’re now in an actual root environment on your computer, so any changes you make will persist after a restart.
From within the chroot
environment, go the root
home directory:
cd /root/
Once there, download the chroot-static
package as described on its AUR Page:
wget https://pkgbuild.com/~morganamilo/pacman-static/x86_64/bin/pacman-static
When done, make sure it’s executable:
chmod +x pacman-static
And now do a complete resync of your system, although possibly only glibc
would be necessary, but rather safe than sorry is my opinion:
./pacman-static -Syu --overwrite='*'
Note: the --overwrite='*'
has potential to be very destructive. Do not use it willy-nilly. And use is strictly at own risk.
Continue as normal with the sync. When done, exit
the chroot
environment:
exit
…and reboot to see if it worked.
Hope it helps!