Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I am slowly making progress on installing Fedora into a Logical Volume for a DomU using Package Management. I have (with the help of the wonderful people at Unix & Linux) resolved a number of issues, mainly surrounding rpm (see links below):

I am using the --root option with rpm to change my newly built version of rpm to /mnt/fedRoot. I have also directed rpm to look at the rpmrc file in the build folder, rather than on the actual /var/lib/rpm. Now Unfortunately, on any rpm file I run though I am getting: error: can't create transaction lock on /mnt/fedRoot (Is a directory). Looking online, I found a few pages that indicated this was an issue with the __db.*. Though deleting them and rebuilding the db within my rpm folder fixed another issue, I am still getting the transaction lock error.

Anyone have insight into this error?

share|improve this question
1  
If you have a file called /var/lock/rpm/transaction, try deleting it. –  fpmurphy1 Jun 18 '11 at 14:57
1  
does the directory /mnt/fedRoot/var/lib/rpm exist ? in analogy to redhat.com/archives/rpm-list/2007-May/msg00046.html , what does rpm --root=/mnt/fedRoot -E '%{_rpmlock_path}' say ? –  Andre Holzner Jun 19 '11 at 19:28
    
Any updates on this problem? Answers to the two suggestions above? –  Caleb Jun 26 '11 at 21:56
    
Sorry for the lack of response, thanks for keeping me honest @Caleb. The command pointed to /usr/lib/rpm/macros. I think the issue was, I was trying to use a version of a fedora install rpm that wasnt compatible with the CentOS rpm I was using. I dont know if that actually makes sense (to linux experts), but I was able to install another version of CentOS without any issues, so that is what I am basing this on. I have decided to take a step back and try to learn a bit more about linux before I attempt a full-blown xen system again. For now I am using Fedora 14 as my main system. –  Hari Seldon Jun 26 '11 at 22:07

3 Answers 3

As you are having error of 'can't create the transaction lock on rpm', to solve this error and get install the required package on your machine you just have to login to your root user through terminal window 'su -root' and then install your rpm package. The error gets solved.

share|improve this answer
1  
Can you highlight what your answer adds above and beyond the existing answers? –  Anthon Mar 12 at 9:30

Something else is holding that lock. Wait a while. (It is usually the graphical package management tool refreshing it's view of what's available, or perhaps a run of yum).

share|improve this answer

Try running your command as root. It worked for me.

share|improve this answer
    
Why does running as root work? –  Kevin Meredith May 31 '13 at 16:48

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.