From: David C. <cl...@au...> - 2004-10-21 01:20:56
|
Phil, This isn't going to be perfect for you, but I think it will at least get you what you want, which is making the commands from coreutils available without having to build them yourself. The packages are not relocatable, and many of them have dependencies on libraries where it will look explicitly in /opt/freeware/lib and stuff like that, but in the case of coreutils I think most (if not all) of them are just general standalone commands that can probably run elsewhere. I did a little experimenting, and here is what I came up with. I'll include the failures because I think they are instructive. I'm pretending you want to install them in /home/prl2/toolbox, but you could use another path name. And I have the coreutils rpm image in the current directory as I run this. Also I did it all on the command line w/o using the .rpmrc config file: $ mkdir /home/prl2/toolbox $ rpm --root /home/prl2/toolbox -Uv coreutils*rpm failed to open /home/prl2/toolbox/var/opt/freeware/lib/rpm/packages.rpm: No such file or directory error: cannot open /home/prl2/toolbox/var/opt/freeware/lib/rpm/packages.rpm OK, that's easy to correct; make the local database directory and initialize it, then try again: $ mkdir -p /home/prl2/toolbox/var/opt/freeware/lib/rpm $ rpm --root /home/prl2/toolbox --initdb $ rpm --root /home/prl2/toolbox -Uv coreutils* error: failed dependencies: /sbin/install-info is needed by coreutils-5.0-1 /bin/sh is needed by coreutils-5.0-1 /bin/sh is needed by coreutils-5.0-1 libc.a(shr.o) is needed by coreutils-5.0-1 libiconv.a(shr4.o) is needed by coreutils-5.0-1 libintl.a(libintl.so.1) is needed by coreutils-5.0-1 All of these dependencies are installed with rpm and are simply not known to your local non-root database. Instead of making a virtual package, let's just install with --nodeps to ignore dependency-checking, $ rpm --root /home/prl2/toolbox -Uv coreutils*rpm --nodeps coreutils-5.0-1 unpacking of archive failed on file /opt/freeware/bin/basename: cpio: open failed - Permission denied OK -- now that let me attempt to install, but it didn't work because it can't write to /opt. Let's try using --relocate: $ rpm --root /home/prl2/toolbox -Uv coreutils*rpm --nodeps --relocate /opt=/home/prl2/toolbox path /opt is not relocateable for package coreutils-5.0-1 The package is not relocatable. But there is an option "--badreloc" which says to relocate files even though the package doesn't allow it. Try that: $ rpm --root /home/prl2/toolbox -Uv coreutils*rpm --nodeps --badreloc /opt=/home/prl2/toolbox coreutils-5.0-1 unpacking of archive failed on file /usr/bin/dir: cpio: symlink failed - Permission denied That error is only because it is trying to create symlinks into /usr/bin for the commands that don't otherwise exist on AIX. But notice that it took a longer to run, and you'll see why. Go into your /home/prl2/toolbox directory and you'll see a "freeware/bin" subdirectory that has all the commands you want. So although it didn't officially install, you've now got your commands. I think the real answer is that you can't really install this non-root and should ask the administrator if they'll install it properly, but you can more-or-less work cheat around it by doing the above. With coreutils, I bet most of the commands will work. The other option would be to build your own coreutils from source and run "configure --prefix=/home/prl2" from the top of the coreutils source tree. On Wed, Oct 20, 2004 at 12:46:37PM -0400, Phil Lawrence wrote: > On Oct 20, 2004, at 10:26, Phil Lawrence wrote: > > I've searched the archive of this list, but didn't find anyone > > talking about how to install aixtoolbox RPMS as a non-privileged > user... -- David Clissold cl...@au... |