LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This 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


Reply
  Search this Thread
Old 06-28-2009, 01:58 AM   #16
Simon Bridge
LQ Guru
 
Registered: Oct 2003
Location: Waiheke NZ
Distribution: Ubuntu
Posts: 9,211

Rep: Reputation: 198Reputation: 198

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?
 
Old 06-29-2009, 03:34 AM   #17
zhjim
Senior Member
 
Registered: Oct 2004
Distribution: Debian Squeeze x86_64
Posts: 1,748
Blog Entries: 11

Rep: Reputation: 233Reputation: 233Reputation: 233
Quote:
Originally Posted by Simon Bridge
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.
 
Old 06-29-2009, 07:54 AM   #18
Simon Bridge
LQ Guru
 
Registered: Oct 2003
Location: Waiheke NZ
Distribution: Ubuntu
Posts: 9,211

Rep: Reputation: 198Reputation: 198
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 08:00 AM. Reason: split the post
 
Old 06-29-2009, 07:58 AM   #19
Simon Bridge
LQ Guru
 
Registered: Oct 2003
Location: Waiheke NZ
Distribution: Ubuntu
Posts: 9,211

Rep: Reputation: 198Reputation: 198
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.
 
Old 06-30-2009, 02:46 AM   #20
zhjim
Senior Member
 
Registered: Oct 2004
Distribution: Debian Squeeze x86_64
Posts: 1,748
Blog Entries: 11

Rep: Reputation: 233Reputation: 233Reputation: 233
Quote:
Originally Posted by Simon Bridge
Looking at the man page...
Digging through http://www.rpm.org/max-rpm/ch-rpm-install.html I finally found the last piece:
--dbpath <path>: Use <path> To Find RPM Database

Code:
@trial:~$ rpm --initdb --root /home/sascha/best
error: can't create transaction lock on /var/lib/rpm/__db.000
@trial:~$ rpm --initdb --root /home/trial/best --dbpath /home/trial/best/var/lib/rpm
error: can't create transaction lock on /home/trial/best/var/lib/rpm/__db.000
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.
This sure do the trick. But needs another app
Code:
$ wget http://www.cyberciti.biz/files/lighttpd/rhel4-php5-fastcgi/php-5.1.4-1.esp1.x86_64.rpm
$ rpm2cpio php-5.1.4-1.esp1.x86_64.rpm | cpio -idmv
taken from http://www.cyberciti.biz/tips/how-to...alling-it.html

Last edited by zhjim; 06-30-2009 at 02:49 AM. Reason: reformat
 
Old 07-01-2009, 06:00 AM   #21
vap16oct1984
Member
 
Registered: Jun 2009
Location: INDIA
Distribution: RHEL-5
Posts: 174
Blog Entries: 3

Rep: Reputation: 38
Thumbs down

Quote:
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 06:03 AM.
 
Old 07-01-2009, 07:30 AM   #22
archtoad6
Senior Member
 
Registered: Oct 2004
Location: Houston, TX (usa)
Distribution: MEPIS, Debian, Knoppix,
Posts: 4,727
Blog Entries: 15

Rep: Reputation: 233Reputation: 233Reputation: 233
Quote:
Originally Posted by priya@linux View Post
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 View Post
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"
 
Old 07-01-2009, 09:55 AM   #23
Simon Bridge
LQ Guru
 
Registered: Oct 2003
Location: Waiheke NZ
Distribution: Ubuntu
Posts: 9,211

Rep: Reputation: 198Reputation: 198
@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.
 
Old 07-02-2009, 07:06 AM   #24
vap16oct1984
Member
 
Registered: Jun 2009
Location: INDIA
Distribution: RHEL-5
Posts: 174
Blog Entries: 3

Rep: Reputation: 38
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Is there is any wat to non root user can able to install rpm baskar.v Linux - Newbie 9 11-18-2008 04:23 AM
installing an rpm as a non-root user sidra Red Hat 2 09-19-2007 03:54 PM
rpm -i --prefix=/home/user package.src.rpm doesn't work? registering Linux - Software 2 07-18-2007 12:28 PM
can i install rpm package as non-root user? parv Linux - Software 10 09-17-2004 11:46 PM
rpm freezes up while installing as root timberwolf Linux - Software 4 12-07-2003 06:18 PM


All times are GMT -5. The time now is 10:54 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration