Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
priya@linux: your error usually means that a library is not installed. If you are not the sysadmin, this will probably mean installing the library, from another package, also from source... then modifying the build variables to point to the non-standard location.
Am I correct in surmising you are not the sysadmin for your system?
zhjim: the --root option will, indeed, allow to install to a non standard location and I kick myself not recalling that. However, does not rpm itself needs root to run it? OP wants to install as a non-root user.
vap16oct1984: please do not use so many contractions - it is hard for newcomers to understand and against the board rules. As a linux admin yourself, do you know any way to run rpm without being root?
However, does not rpm itself needs root to run it? OP wants to install as a non-root user.
As a first shoot I would say rpm does not need root. Especially when doing the initdb. But some trials have shown that it sure does. It always gives me
Code:
error: can't create transaction lock on /var/lib/rpm/__db.000
when either trying to --initdb or --install a package. (Note this is on a debian machine, but also quickly tested on Suse 10.2).
What really suprises me is that the var/lib/rpm structure gets created inside the --root directory. Giving others the write access inside --root var/lib/rpm/ doesn't do any good either.
Interesting investigation - I would have thought that rpm itself living in /bin or /sbin would require root access just to run it - but it is too long since I've run an rpm-based system.
Looking at the man page...
I see there is a per-user configuration file ~/.rpmrc whose existence would appear promising.
Option: --relocate OLDPATH=NEWPATH
seems promising also, for binary packages which are relocatable.
for --root DIRECTORY
Use the file system tree rooted at DIRECTORY for all operations. Note that this means the database within DIRECTORY will be used for dependency checks and any scriptlet(s) (e.g. %post if installing, or %prep if building, a package) will be run after a chroot(2) to DIRECTORY.
... looks like you want to have set up an rpm install tree at the DIRECTORY - i.e. all the things rpm depends on to work also have to be there. You could probably set this up without being sysadmin. Want to check the result of a --root install as sysadmin? Does it behave as expected? "All operations" may not mean "use DIRECTORY as the root of the install path. It could mean "install to the standard place but use data as if root = DIRECTORY".
Note - if the program comes in a binary rpm, it may be simple enough to just extract the binary to the directory of ones choice and run it from there.
Last edited by Simon Bridge; 06-29-2009 at 07:00 AM.
Reason: split the post
Until I hear otherwise, I am proceding as if priya is not the sysadmin.
Advice still holds - ask the sysadmin to install the program - or an approved equivalent. If this is a school/university machine, considering the program in question this seems likely, then ask a course supervisor to ask the sysadmin. This is usually more effective.
If the admin, or whoever, says no, then give up. Go curse short-sighted admins everywhere and look for something else. Get a laptop. Create a VPN to your home computer and run the software there. Whatever.
The only reason I'm still watching this is that the problem is an interesting application of hacking skills.
Reviewing the software - the first program was GDIS and the second was GULP
The system is stated to be Ubuintu (no release number given) so one would not be bothering with rpm anyway, not usually. You'd want to hack dpkg and a deb file.
We'd normally sudo apt-get install gdis as GDIS is in the repos.
GULP is not free software
Quote:
GULP is available free of charge to academics provided you accept the following conditions of use:
1. The program is not to be distributed to anyone else without the express permission of the author.
2. The program is not to be used for commercial research. For any commercial use of the program a license must be obtained from Accelrys Inc, including contract research.
3. The program is supplied on an "as is" basis with no implied guarantee or support.
... and registration is required to download - which checks that the user has access to an academic email address. A university computer looks very likely.
GULP devs support linux and mac (but not windows - in ter rest ting) so one could reasonably email for help - but read the faq first. The FAQ says that you have to edit the file getmachine under the Linux or Darwin section, for PC Linux and Mac respectively, and set the options appropriately for your machine. It's a fortran program, and linux has a choice of compilers.
So - did priya do this? If not, this may well explain the not-found library. Of course not having the lib installed or installed to a non-standard place, or not having permissions to access the lib would all produce that error too.
GULP does not exist as a deb file or an rpm.
One could use the dpkg tools to make a deb file, then install from that. You still want a valid build environment though, which we do not seem to have.
Downloading the GDIS deb file from the repo, and extracting it to see what's what would be another approach.
Okay one would need to create the directory --root/var/lib/rpm but the point gets across
Quote:
Originally Posted by Simon Bridge
... looks like you want to have set up an rpm install tree at the DIRECTORY - i.e. all the things rpm depends on to work also have to be there. You could probably set this up without being sysadmin. Want to check the result of a --root install as sysadmin? Does it behave as expected? "All operations" may not mean "use DIRECTORY as the root of the install path. It could mean "install to the standard place but use data as if root = DIRECTORY".
Funny thing is that even as sysadmin only the --root/var/lib/rpm directory gets created.
To be honest I think we just run into all these trouble cause we are not using a native rpm distribution. After thinking a bit about my tests on Suse 10.2 I recall that I manualy created the userdir cause I forgot the option to useradd so there was no .rpmrc which sure holds some sane variables. What further leads me into thinking that is (taken from --root part of the manual)
Code:
In addition, RPM expects its database to reside in the directory
specified by the dbpath rpmrc file entry, relative to <path>.
The relative stuff gets us.
Quote:
Originally Posted by Simon Bridge
Note - if the program comes in a binary rpm, it may be simple enough to just extract the binary to the directory of ones choice and run it from there.
Originally Posted by vap16oct1984: please do not use so many contractions - it is hard for newcomers to understand and against the board rules. [B
As a linux admin yourself, do you know any way to run rpm without being root?[/B]
Well Simon, i think time has come to refresh your memory. For running rpm its not required to be root and pls dont under estimate any one. You know no one is perfect. With knowing the things pls dont challenge me and dont try to become oversmart
Good luck
Last edited by vap16oct1984; 07-01-2009 at 05:03 AM.
i am having ubuntu and want to install gulp-3.0 (not an rpm pkg) in my home dir not as root . hw i will do it?
Quote:
Originally Posted by Simon Bridge
The system is stated to be Ubuntu (no release number given) so one would not be bothering with rpm anyway, not usually. You'd want to hack dpkg and a deb file.
Did no one else get it? UBUNTU a Debian based distro, uses .debs, has repos, needs alien if RPM are absolutely necessary (etc., etc., etc.).
I grant that OP is not the clearest user of the language, but really! Thus the majority of the posts here are based on erroneous assumptions/data; &, AFAIAC, should be hidden. (Would that LQ had such a facility.)
My apologies to anyone besides Simon who posted anything useful which I overlooked because of all the dross.
For those who don't understand (New)English understatement:
"should be hidden" == "totally worthless"
"dross" == "utter shit"
@vap16oct1984: Hey, don't be like that. I phrased that as a question in order to have you enlighten me - precisely because I could be mistaken. The trouble with this sort of thing is that it can be easily misread as sarcasm... if this is what happened, I apologize.
looking again I see that ls -l /usr/bin/rpm returns permissions rwxr-xr-x - which would mean that regular users can run rpm except for rpm -i, since the target directory is unlikely to be writeable.
@archtoad6: subverting alien or dpkg looks even harder. The rpm idea was sort-of interesting but you are right - it is off topic.
Well Simon,
lets be friend. We all are here with common goal. And the goal is to make linux much
more better place for the people. We are here to help people, give them idea's ,view's.
So that they can enjoy linux.
We all here to discuss things issue related to linux and share our ideas with them.
Its not about you or me. Its for all the people of the world who loves linux.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.