As I also have to upgrade the packages on my server, and the /lib exist problem, when forcing installation, caused some mess on my desktop machine, I really have to do something different on my server when upgrading the packages there.

http://www.linuxquestions.org/questions/linux-newbie-8/arch-pacman-su-error-glibc-lib-exists-in-filesystem-4175418135/ gave me some solution:

$ grep '^lib/' /var/lib/pacman/local/*/files

To remove all packages except glibc which install in /lib. In the case of the server, these were gcc-multilib libtool-multilib and lib32-glibc. In other words, the 32 bit support parts.

So, in order to revert the system to 64 bit, we use:

# pacman -S -d gcc-libs

To use only the 64 bit versions of the gcc-libs. The option -d is added to not check for dependencies. Please note I have switched to using pacman directly in stead of using yaourt. This feels a little safer when doing operations that could destroy the system.

# pacman -R lib32-gcc-libs lib32-libltdl lib32-glibc

However upgrading the system still fails due the existance of /lib. I have removed all packages that exist in /lib, thus this was not the problem. It seems, the problem was the existance of the directory /lib/yaourt. Moving this directory temporary outside /lib makes the upgrade work. So, when it’s finished, the services that are affected are restarted, the removed packages have been restored, I can move the yaourt directory back where it belongs.

So, now, we know the solution for the /lib exists problem which has been appearing on the internet on many places, just move the yaourt directory (temporary) elsewhere and perform the upgrade through pacman directly.

After the upgrade, it seems the /lib/yaourt directory has been recreated.

« »