A solution to save your ass if you broke pacman after force removed
gcc-multilib
andgcc-libs-multilib
on your Arch Linux
Preface
If you've installed gcc-libs-multilib
and gcc-multilib
in your Arch Linux,
you might cannot $ sudo pacman -Syu
because sometimes they will conflict with gcc-libs
and gcc
in [core]
repository.
You have two choices:
- Don't install
gcc
andgcc-libs
to avoid the conflict, and wait untilgcc-multilib
andgcc-libs-multilib
have new version.- Remove them from the list of packaged to install of this packages upgrade.
- Force remove
gcc-multilib
andgcc-libs-multilib
with$ sudo pacman -Rdd gcc-multilib gcc-libs-multilib
.
If you do the latter, and break your pacman
, then this blog post may be your salvation.
I just encountered this situation and that's why I wrote down this blog post.
Error Message
pacman: error while loading shared libraries: libstdc++.so.6: cannot open shared object file: No such file or directory
$ ldd $(which pacman)
...
libstdc++.so.6 => not found
libgcc_s.so.1 => not found
These two share objects are gone which make pacman
broken.
Solution
Copy libstdc++.so.6
and libgcc_s.so.1
from other Arch Linux computer with same architecture.
If you have nothing to copy from, I've backed up these two shared objects with x86_64 architecutre below.
(If somehow you cannot download these two files or these doesn't work for you,
you can try the following link in the reference part.
Someone also backed up these two files and uploaded them in the reply of the forum thread.)
- Download these 2 share objects:
- libstdc++.so.6
- sha256sum: 30c1b6ae5936f5f4afdba39f44465efc84422e957db13580e1891f081b615d0e
- libgcc_s.so.1
- sha256sum: 95298eef28aca7cef5b28d8388ef0ea3721add9e7c19df74054d7b1c41bcca2e
- libstdc++.so.6
$ sudo mv libstdc++.so.6 libgcc_s.so.1 /usr/lib
$ sudo pacman -S --force gcc gcc-libs
- Make sure you use
--force
option, or pacman will complain about these two files are conflict.
- Make sure you use
Reference
Share
Donation
如果覺得這篇文章對你有幫助, 除了留言讓我知道外, 或許也可以考慮請我喝杯咖啡, 不論金額多寡我都會非常感激且能鼓勵我繼續寫出對你有幫助的文章。
If this blog post happens to be helpful to you, besides of leaving a reply, you may consider buy me a cup of coffee to support me. It would help me write more articles helpful to you in the future and I would really appreciate it.
Related Posts
- [Arch Linux] Failed to commit transaction (invalid or corrupted package) error
- pacman mirrorlist - Taiwan vs. Taiwan (Province of China)
- Disable auto suspend while the laptop lid close in Arch Linux
- 用 broadcom-wl-dkms 讓 BCM4360 [14e4:43a0] (rev 03) 能順利在 Arch Linux 中使用
- Setup Static Ip Wired Network in Arch Linux