You are not logged in.
Pages: 1
Hey guys,
I dont know, if there is already a topic with the same problem, but unfortunately i didnt find one.
I looked up in the internet for the same problem, but my little knowledge of english and archlinux makes it very difficult for me.
My Problem:
I wanted to install the vlc-player and meanwhile some other programs so i tried to get the packages using
[matt@sx20 ~]$ packer -S vlc
Password:
but what i get back is
error: failed to init transaction (unable to lock database)
if you're sure a package manager is not already
running, you can remove /var/lib/pacman/db.lck
in the next steps, i tried to remove that file... in vain
[matt@sx20 ~]$ sudo rm /var/lib/pacman/db.lck
rm: cannot remove `/var/lib/pacman/db.lck': Operation not permitted
[matt@sx20 ~]$ sudo mv /var/lib/pacman/db.lck ~/
Password:
mv: cannot remove `/var/lib/pacman/db.lck': Operation not permitted
[matt@sx20 ~]$ sudo rm -f /var/lib/pacman/db.lck
rm: cannot remove `/var/lib/pacman/db.lck': Operation not permitted
As i mentioned, i am a beginner a in arch linux, so please write me a detailed list, what i have to do to remove this problem.
If you need more detail to solve this problem, just mail me.
Thank you a lot
steve24
Last edited by steve24 (2010-05-21 18:59:48)
Offline
Not familiar with packer but are you sure no other instance of pacman or packer etc is working since that is what the error means. Have you tried installing vlc or something else with plain old pacman?
Offline
Are you sure a package manager is not already running?
> wanted to install the vlc-player and meanwhile some other programs
You have to wait until pacman finishes installing some packages to call it again.
Sprechst du Deutsch?
https://www.archlinux.de/
Last edited by karol (2010-05-20 20:02:39)
Offline
yes, i tried... the same thing appears.
I tried already "sudo killall pacman" , but no process called pacman is running.
are there other package manager too, that could run?
@karol, Ja, Danke.
Offline
Close all apps, reboot, try running pacman. If the warning about '/var/lib/pacman/db.lck' appears again, try removing the file as root.
Offline
warning appeared again...
when i use 'sudo rm /var/lib/pacman/db.lck', is that removing as root?
cause it doesnt work either...
Offline
[karol@black ~]$ su
Password:
[root@black karol]# rm /var/lib/pacman/db.lck
This is root.
If you still can't remove it, what are the permissions of that file
[karol@black ~]$ ls -l /var/lib/pacman/db.lck
---------- 1 root root 6 May 20 22:52 /var/lib/pacman/db.lck
Offline
permissions here are the same as yours.
but the computer isnt mine, so i have to ask for the password tomorrow.
Thanks for your help so far!
Last edited by steve24 (2010-05-20 21:03:36)
Offline
The file should disappear when you quit pacman / packer etc.
There's a German wiki so you can read all about pacman in your native lang.
https://wiki.archlinux.de/title/Pacman
Offline
Try not sudo but su and then login with the root password and then rm the file. I have this problem too sometimes when I CTRL+Z the pacman process but I only use pacman as root (not sudo - as real root) and rm'ing the files always solves it.
If that doesnt work, just press CTRL+ALT+F1 and you'll be in the terminal number one where you will asked for a username and password. Login as root there and deleting the lock file should be no problem. Then just switch back to the GUI (CTRL+ALT+F7).
Offline
> when I CTRL+Z the pacman process
What for?
Offline
> when I CTRL+Z the pacman process
What for?
I know it's the worst thing to do to a running process and I do it only on emergency situations (promise to use CTRL+C next time) but I mentioned it here just because it's an example why the lock might stay even though the process is long gone.
Offline
karol wrote:> when I CTRL+Z the pacman process
What for?I know it's the worst thing to do to a running process and I do it only on emergency situations (promise to use CTRL+C next time) but I mentioned it here just because it's an example why the lock might stay even though the process is long gone.
Um, when you CTRL+Z a process, it isn't long gone, it's just paused, basically. To start it again, do CTRL+Z or run `fg'.
Offline
Please post the output of 'lsattr /var/lib/pacman/db.lck'.
Offline
as i said, today i'll get the root password, and then i'll hopefully inform you about my success.
[matt@sx20 ~]$ sudo lsattr /var/lib/pacman/db.lck
----i--------e- /var/lib/pacman/db.lck
thx for your help
Offline
I suspect that is your problem. For some reason the 'i' attribute had been set, which prevents any modification to the file (including removal) until it has been unset.
Run:
sudo chattr -i /var/lib/pacman/db.lck
and try once again to remove the file.
Offline
thx chpln, your command worked!
Offline
Pages: 1