You are not logged in.
Dear all,
today I got the following error message while updating (reproduced by reinstalling the package):
$ sudo pacman -S lvm2
warning: lvm2-2.02.160-1 is up to date -- reinstalling
resolving dependencies...
looking for conflicting packages...
Packages (1) lvm2-2.02.160-1
Total Installed Size: 5.27 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...
error: cannot remove /usr/lib/libdevmapper-event-lvm2thin.so (Operation not permitted)
(1/1) reinstalling lvm2 [######################################################################] 100%
warning: warning given when extracting /usr/lib/libdevmapper-event-lvm2thin.so (Could not remove symlink /usr/lib/libdevmapper-event-lvm2thin.so)
:: Running post-transaction hooks...
(1/1) Updating manpage index...
/usr/lib/libdevmapper-event-lvm2thin.so is indeed a symlink like so
$ ls -l /usr/lib/libdevmapper-event-lvm2thin.so
lrwxrwxrwx 1 root root 44 Jun 26 21:33 /usr/lib/libdevmapper-event-lvm2thin.so -> device-mapper/libdevmapper-event-lvm2thin.so
/usr/lib is write-able for root
$ ls -ld /usr/lib
drwxr-xr-x 202 root root 151552 Jul 12 13:48 /usr/lib
The file the symlink points to is not, but that shouldn't matter, right?
$ ls -l /usr/lib/device-mapper/libdevmapper-event-lvm2thin.so
-r-xr-xr-x 1 root root 18880 Jul 6 20:48 /usr/lib/device-mapper/libdevmapper-event-lvm2thin.so
The following strace output did not tell me much but might be insightful for someone else
$ sudo strace -f pacman --noconfirm -S lvm2 2>&1| grep /usr/lib/libdevmapper-event-lvm2thin.so
lstat("/usr/lib/libdevmapper-event-lvm2thin.so", {st_mode=S_IFLNK|0777, st_size=44, ...}) = 0
access("/usr/lib/libdevmapper-event-lvm2thin.so", W_OK) = 0
lstat("/usr/lib/libdevmapper-event-lvm2thin.so", {st_mode=S_IFLNK|0777, st_size=44, ...}) = 0
unlink("/usr/lib/libdevmapper-event-lvm2thin.so") = -1 EPERM (Operation not permitted)
write(2, "cannot remove /usr/lib/libdevmap"..., 80cannot remove /usr/lib/libdevmapper-event-lvm2thin.so (Operation not permitted)
lstat("/usr/lib/libdevmapper-event-lvm2thin.so", {st_mode=S_IFLNK|0777, st_size=44, ...}) = 0
lstat("/usr/lib/libdevmapper-event-lvm2thin.so", {st_mode=S_IFLNK|0777, st_size=44, ...}) = 0
unlink("/usr/lib/libdevmapper-event-lvm2thin.so") = -1 EPERM (Operation not permitted)
write(2, "warning given when extracting /u"..., 137warning given when extracting /usr/lib/libdevmapper-event-lvm2thin.so (Could not remove symlink /usr/lib/libdevmapper-event-lvm2thin.so)
[pid 11976] stat("/usr/lib/libdevmapper-event-lvm2thin.so", {st_mode=S_IFREG|0555, st_size=18880, ...}) = 0
[pid 11976] open("/usr/lib/libdevmapper-event-lvm2thin.so", O_RDONLY) = 4
Any hints on what's going wrong here or how to investigate further are appreciated.
Offline
What's the output of 'lsattr /usr/lib/device-mapper/libdevmapper-event-lvm2thin.so'?
R00KIE
Tm90aGluZyB0byBzZWUgaGVyZSwgbW92ZSBhbG9uZy4K
Offline
What's the output of 'lsattr /usr/lib/device-mapper/libdevmapper-event-lvm2thin.so'?
$ lsattr /usr/lib/device-mapper/libdevmapper-event-lvm2thin.so
--------------e---- /usr/lib/device-mapper/libdevmapper-event-lvm2thin.so
Offline
No immutable attribute, that leaves me out of ideas.
R00KIE
Tm90aGluZyB0byBzZWUgaGVyZSwgbW92ZSBhbG9uZy4K
Offline
No immutable attribute, that leaves me out of ideas.
Thanks for the hint anyway.
So this seems to not be a pacman problem because I also cannot remove the symlink by hand:
$ sudo rm /usr/lib/libdevmapper-event-lvm2thin.so
rm: cannot remove '/usr/lib/libdevmapper-event-lvm2thin.so': Operation not permitted
Offline
What filesystem are you using? I would try to boot from the install media and (force) fsck all the filesystems, just to make sure everything is ok.
R00KIE
Tm90aGluZyB0byBzZWUgaGVyZSwgbW92ZSBhbG9uZy4K
Offline
I'm using ext4. Did a forced fsck, which found nothing.
Offline