Problem

Sometimes when you try to install some pacman packages.

sudo pacman -S mongodb
resolving dependencies...
looking for conflicting packages...

Package (5)            New Version       Net Change

extra/gperftools       2.6.2-1             2.30 MiB
community/lsb-release  1.4-14              0.04 MiB
community/wiredtiger   2.9.3.20171205-2    4.90 MiB
community/yaml-cpp     0.6.2-1             0.58 MiB
community/mongodb      3.6.3-1           137.39 MiB

Total Installed Size:  145.21 MiB

:: Proceed with installation? [Y/n] y
(5/5) checking keys in keyring                     [----------------] 100%
(5/5) checking package integrity                   [----------------] 100%
(5/5) loading package files                        [----------------] 100%
(5/5) checking for file conflicts                  [----------------] 100%
error: failed to commit transaction (conflicting files)
lsb-release: /etc/lsb-release exists in filesystem
Errors occurred, no packages were upgraded.

Solution

Here’s some solution to this problem. Move /etc/lsb-release to a backup file (/etc/lsb-release.bak)

sudo mv /etc/lsb-release /etc/lsb-release.bak

Try to install the package again.

sudo pacman -S mongodb
resolving dependencies...
looking for conflicting packages...

Package (5)            New Version       Net Change

extra/gperftools       2.6.2-1             2.30 MiB
community/lsb-release  1.4-14              0.04 MiB
community/wiredtiger   2.9.3.20171205-2    4.90 MiB
community/yaml-cpp     0.6.2-1             0.58 MiB
community/mongodb      3.6.3-1           137.39 MiB

Total Installed Size:  145.21 MiB

:: Proceed with installation? [Y/n] y
(5/5) checking keys in keyring                     [----------------] 100%
(5/5) checking package integrity                   [----------------] 100%
(5/5) loading package files                        [----------------] 100%
(5/5) checking for file conflicts                  [----------------] 100%
(5/5) checking available disk space                [----------------] 100%
:: Processing package changes...
(1/5) installing yaml-cpp                          [----------------] 100%
(2/5) installing lsb-release                       [----------------] 100%
(3/5) installing gperftools                        [----------------] 100%
Optional dependencies for gperftools
    graphviz: pprof graph generation [installed]
    gv: pprof postscript generation
(4/5) installing wiredtiger                        [----------------] 100%
(5/5) installing mongodb                           [----------------] 100%
Optional dependencies for mongodb
    libpcap: needed for mongosniff [installed]
    mongodb-tools: mongoimport, mongodump, mongotop, etc
:: Running post-transaction hooks...
(1/4) Reloading system manager configuration...
(2/4) Creating system user accounts...
(3/4) Creating temporary files...
(4/4) Arming ConditionNeedsUpdate...

:D