Having trouble updating package: not overwriting dir with file /usr/local/share/man

When updating filesystem I encountered the following error:

~ via 🐍 v3.9.9 took 4s 
❯ sudo pacman --overwrite '/usr/local/*' -S filesystem 
warning: filesystem-2021.12.07-2 is up to date -- reinstalling
resolving dependencies...
looking for conflicting packages...

Packages (1) filesystem-2021.12.07-2

Total Installed Size:  0.01 MiB
Net Upgrade Size:      0.00 MiB

:: Proceed with installation? [Y/n] y
(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%
:: Processing package changes...
(1/1) reinstalling filesystem                                                                                                  [#############################################################################] 100%
error: extract: not overwriting dir with file /usr/local/share/man
error: problem occurred while upgrading filesystem
error: could not commit transaction
error: failed to commit transaction (transaction aborted)
Errors occurred, no packages were upgraded.

How can I fix this ?

Here is what happened before this error:
My PC froze in the middle of last system update (when updating the kernel). The system won’t boot so I did some poking around and fixing. I might have messed up the system a little, resulting in this error.

Maybe you need to tell what you did exactly to help in repairing it. It seems no one here is into guessing to repair ;-

What I did:
Reinstalled the kernel using mhwd-kernel.
Fixed the complaints of ld-config saying so libraries were empty(size 0) by installing relevant packages

I fixed this problem by deleting the directory /usr/share/local/man, since it contains nothing but a bunch of empty directories.

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.