Gcc10-libs conflict with gcc12 during update

Hello, when trying to update ( pacman -Syyu) I got:

error: failed to commit transaction (conflicting files)
gcc12: /usr/lib/gcc/x86_64-pc-linux-gnu/lib/libgcc_s.so exists in filesystem (owned by gcc10-libs)
gcc12: /usr/lib/gcc/x86_64-pc-linux-gnu/lib/libgcc_s.so.1 exists in filesystem (owned by gcc10-libs)
Errors occurred, no packages were upgraded.

what do I do? thank you

not 100% sure, but it looks like you have an old package of gcc10-libs lying around. Can you try to uninstall gcc10-libs and then try to update again? Maybe also using

pamac update

might help in the future as it’s better in handling replacement of existing packages by new ones.

1 Like

Is from the aur and is blocking your updates. Remove it, or in the case you are missing the actual gcc and/or gcc-libs … then install those, replacing that outdated package.

Thank you. Could you give me the command to unistall it, please? don’t want to make more of a mess. Thanks

Simple way is open pamac click search type gcc or whatever your searching for then see whats installed.Uninstall what was suggested in the post then install whats suggested in the post and reboot.

As mentioned here.

you seem to have installed packages from AUR, which is in general not officially supported.

To uninstall the package, try the following

pamac remove gcc10-lib

and then

pamac update

to start the update process again. Please report back if you encounter other issues.

1 Like

I tried to desinstall but got:

Error: Failed to prepare transaction:
could not satisfy dependencies:
- removing gcc10-libs breaks dependency 'gcc10-libs' required by gcc10

You have to remove gcc10 as well

sudo pacman -Syu gcc gcc-libs
sudo pacman -Rns gcc10 gcc10-libs

(or maybe the other way around if they dont conflict)

do I need sudo? I get a warning when I wanted to send the command

Yes, unless you are in the root account.

??

sorry. was interrupted. Did it then pamac udate and:

Error: Failed to prepare transaction:
could not satisfy dependencies:

  • unable to satisfy dependency ‘gcc11-libs=11.3.0-5’ required by gcc11

Edit build files : [e]
Apply transaction ? [e/y/N]

am a bit lost

I dont know what you tried to enter for that output.

I wrote 2 commands above.

I did the two commands and later did pamac update

It also appears you have gcc11
Can you please show the output of:

pacman -Qs gcc

you@ms-nl4050cu ~]$ pacman -Qs gcc
local/gcc 12.2.1-2 (base-devel)
The GNU Compiler Collection - C and C++ frontends
local/gcc-libs 12.2.1-2
Runtime libraries shipped by GCC
local/gcc11 11.3.0-5
The GNU Compiler Collection - C and C++ frontends (11.x.x)
local/gcc11-libs 11.3.0-5
Runtime libraries shipped by GCC (11.x.x)
local/lib32-gcc-libs 12.2.1-2 (multilib-devel)
32-bit runtime libraries shipped by GCC

Alrighty…

sudo pacman -Rns gcc11 gcc11-libs

: Processing package changes…
(1/2) removing gcc11 [######################] 100%
(2/2) removing gcc11-libs [######################] 100%
ldconfig: File /usr/lib/libpamac-flatpak.so.old is empty, not checked.
ldconfig: File /usr/lib/libpamac-snap.so.old is empty, not checked.
:: Running post-transaction hooks…
(1/1) Arming ConditionNeedsUpdate…

Is a different issue. We may come back to that.

Otherwise it appears those packages were removed.

So in total you needed to remove gcc10 , gcc10-libs , gcc11 , gcc11-libs.
You can run an update and you should see a lack of show stopping errors.
(or at least not the same)

sudo pacman -Syu

Thanks. Will do and let you know…I may be interrupted again so…but thank you for your help

As to

I might suggest removing the files and reinstalling the associated packages:

sudo rm /usr/lib/libpamac-flatpak.so.old /usr/lib/libpamac-snap.so.old
sudo pacman -Syu libpamac-flatpak-plugin libpamac-snap-plugin

Or if you dont use snap or flatpak you may just remove the associated packages.