[email protected] wrote:
> I'm trying to install OpenOffice.org 3.0.1 without root access, but it
> isn't working for me, not without some extreme hackery.
>
> Here's the specific error I get:
>
> rpm --upgrade --ignoresize -vh --dbpath ~/opt/.RPM_OFFICE_DATABASE
> ~/ooo/RPMS/userland/openoffice.org-userland-1.0-0.noarch.rpm
> Returns: 1 Error during installation
> error: can't create transaction lock on /var/lock/rpm/transaction
>
> All subsequent package installations either fail in the same way or die
> because prerequisite packages failed.
>
> How can I convince rpm to forgo the transaction lock? That's the only
> thing preventing rpm from working. As far as I know, the only
> command-line option for this is --test, which of course has side
> effects. Or maybe I should say, it doesn't. :^)
>
>>From looking at the source code of my version of rpm (4.3.3), I see that
> the name and path of the transaction lock file are hard coded. It uses
> open() and fcntl() to manage the lock. I guess I could use LD_PRELOAD
> to override the behavior of these functions when operating on the lock
> file. But if I'm willing to go that route, it'll be much simpler to
> override rpmtsAcquireLock() and rpmtsFreeLock():
>
> $ cat rpmhack.c
> void* rpmtsAcquireLock() {return (void*)1;}
> void rpmtsFreeLock() {}
> $ gcc -shared -o rpmhack.so rpmhack.c
> $ LD_PRELOAD="$PWD"/rpmhack.so ./setup
>
> While this does work (YAY!), it's not likely to work for an arbitrary
> version of rpm, only unmodified 4.3.3.
>
> I get the impression that (at least on Unix) this feature has been
> broken and fixed several times throughout OpenOffice's history. For
> instance, task 33634 says it's fixed by using a special install script,
> but then again the resolution is from 2004. One of its duplicates
> (34605) mentions rpm2cpio, and I see that this utility is used (and
> required!) by the current setup script to unpack jre-6u11-linux-i586.rpm
> without using root, but the actual Java-based installer does not use it.
>
> I am using CentOS 4.7. Root is not available to me.
Searching google for ("can't create transaction lock on
/var/lock/rpm/transaction" not root) without parenthesis, turned up much
info, mostly saying you can't do it without root access.
However, one forums thread I spied may be of interest for you:
It appears this is a known bug with rpms and there is a workaround you
may want to try;
Under comment #2 by Paul Nasrat
"Note, to use --dbpath as non root, customers will need to define the
%_rpmlock_path macro to a location that can be written to; future
versions of RPM use '%{_dbpath}/__db.000'."
Full text here:
<https://bugzilla.redhat.com/show_bug.cgi?id=222194>
HTH
--
Mike Dawe
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]